Re: [PATCH RFC] staging: Add driver to communicate with the T2 Security Chip

From: Aditya Garg
Date: Sun Mar 09 2025 - 05:00:22 EST




> On 9 Mar 2025, at 2:21 PM, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
>
> On Sun, Mar 09, 2025 at 08:44:16AM +0000, Aditya Garg wrote:
>>
>>
>>>> On 9 Mar 2025, at 2:10 PM, Aditya Garg <gargaditya08@xxxxxxxx> wrote:
>>>
>>> From: Paul Pawlowski <paul@xxxxxxxx>
>>>
>>> This patch adds a driver named apple-bce, to add support for the T2
>>> Security Chip found on certain Macs.
>>>
>>> The driver has 3 main components:
>>>
>>> BCE (Buffer Copy Engine) - this is what the files in the root directory
>>> are for. This estabilishes a basic communication channel with the T2.
>>> VHCI and Audio both require this component.
>>>
>>> VHCI - this is a virtual USB host controller; keyboard, mouse and
>>> other system components are provided by this component (other
>>> drivers use this host controller to provide more functionality).
>>>
>>> Audio - a driver for the T2 audio interface, currently only audio
>>> output is supported.
>>>
>>> Currently, suspend and resume for VHCI is broken after a firmware
>>> update in iBridge since macOS Sonoma.
>>>
>>> Signed-off-by: Paul Pawlowski <paul@xxxxxxxx>
>>> Signed-off-by: Aditya Garg <gargaditya08@xxxxxxxx>
>>>
>>
>> FWIW, I am aware of the missing maintainers file and still not removed Linux version checks in the driver.
>>
>> My main purpose of sending this was to know the views of the maintainers about the code quality, and whether this qualifies for staging or not.
>
> I have to ask why do you want this in drivers/staging/ at all? Why not
> take the day or so to clean up the code to be the proper style and
> handle the needed issues and then submit it to the normal part of the
> kernel?
>
> Putting code in staging actually takes more work to clean it up and get
> it out of there than just doing it all at once out-of-tree. So we need
> a good reason why it is in here, as well as what the plan is to get it
> out of staging entirely. So a TODO file in the directory for the driver
> is required here.

I see. I was of the view that staging is more of like a place to keep beta drivers
>
> Also, as this is at least 3 different drivers, this should be a patch
> series and not all in one if at all possible.
>
> thanks,
>
> greg k-h