On Thu, 10 Sep 2020 23:07:15 +0200 Joerg Jung <[email protected]> wrote:
> > Am 07.09.2020 um 20:52 schrieb Mark Kettenis > > <[email protected]>: > >> Date: Mon, 7 Sep 2020 19:59:13 +0200 > >> From: Marcus Glocker <[email protected]> > >> On Mon, 7 Sep 2020 19:25:00 +0200 (CEST) > >> Mark Kettenis <[email protected]> wrote: > >>>> Date: Mon, 7 Sep 2020 12:02:15 -0500 > >>>> From: joshua stein <[email protected]> > >>>> > >>>> On Mon, 07 Sep 2020 at 06:58:01 +0200, Marcus Glocker wrote: > >>>>> This is an initial driver for the Apple System Management > >>>>> Controller found in Intel based Apple computers. > >>>>> > >>>>> The driver is currently missing support for the Sudden Motion > >>>>> Sensor (SMS), light sensor, and keyboard backlight since I don't > >>>>> have that hardware available to develop on. > >>>>> > >>>>> On my iMac11,2 it can deliver fan and temperatures values: > >>>>> > >>>>> hw.sensors.acpiapplesmc0.temp0=24.00 degC (Airflow 1) > >>>>> hw.sensors.acpiapplesmc0.temp1=33.00 degC (CPU Core 0) > >>>>> hw.sensors.acpiapplesmc0.temp2=36.00 degC (CPU Heatsink) > >>>>> hw.sensors.acpiapplesmc0.temp3=40.00 degC (CPU Core 1) > >>>>> hw.sensors.acpiapplesmc0.temp4=47.00 degC (GPU) > >>>>> hw.sensors.acpiapplesmc0.temp5=45.00 degC (GPU Heatsink) > >>>>> hw.sensors.acpiapplesmc0.temp6=59.00 degC (PCH) > >>>>> hw.sensors.acpiapplesmc0.temp7=42.00 degC (Memory) > >>>>> hw.sensors.acpiapplesmc0.temp8=45.00 degC (Mainboard > >>>>> Proximity) hw.sensors.acpiapplesmc0.fan0=998 RPM > >>>>> hw.sensors.acpiapplesmc0.fan1=1132 RPM > >>>>> hw.sensors.acpiapplesmc0.fan2=1198 RPM > >>>>> > >>>>> Feedback, testers, OKs? > >>>> > >>>> Are there machines where asmc(4) will also attach? > > Yes, there are. As far as I know, most of them. > > >>> Good point. My old Macmini1,1 has: > >>> > >>> ... > >>> "APP0001" at acpi0 not configured > >>> ... > >>> asmc0 at isa0 port 0x300/32: rev 1.3f503, 137 keys > >>> ... > >>> > >>> So yes, I'd say there are. > >>> > >>> > >>> Having an acpi attachment is probably better than doing isa > >>> probes. > > Yes, agreed. > > >>> But we probably should consolidate the drivers. > >> > >> D'oh! I wasn't even aware that we already have an asmc(4) driver > >> in our tree. Shame on me :-| > >> > >> Glancing over asmc(4) I don't think there is anything more that my > >> driver would support other than attaching over acpi(4). Would it > >> be possible to only write an acpi glue which attaches to asmc(4)? > > > > I think we'd just want to turn it into an acpi(4) driver. Or maybe > > dump it in favour of your driver. > > Please, can we make sure the new driver supports light sensors > and keyboard backlights as the current driver does, before you > dump it?! > Otherwise that would be an unnecessarily bad regression. As already mentioned, it was not my intention to replace asmc(4). It just don't attaches to my iMac currently, and then I was assuming that we have no support for SMC without checking further. If I would have noticed before that we already have asmc(4) in the tree I wouldn't come up with a new driver :-) Also as already mentioned before I have no other Apple gear with light sensor nor keyboard backlight, so no point for me trying to write that code. So I would say we just leave it as is. Thanks all for your feedback anyway.
