Message ID | 20250503-smc-6-15-v4-0-500b9b6546fc@svenpeter.dev |
---|---|
Headers | show |
Series | Apple Mac System Management Controller | expand |
On Sat, May 3, 2025 at 12:07 PM Sven Peter via B4 Relay <devnull+sven.svenpeter.dev@kernel.org> wrote: > From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> > > Add the DT binding for the Apple Mac System Management Controller GPIOs. > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> > Signed-off-by: Sven Peter <sven@svenpeter.dev> LGTM Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Sat, May 3, 2025 at 12:07 PM Sven Peter via B4 Relay <devnull+sven.svenpeter.dev@kernel.org> wrote: > > From: Hector Martin <marcan@marcan.st> > > This driver implements the GPIO service on top of the SMC framework > on Apple Mac machines. In particular, these are the GPIOs present in the > PMU IC which are used to control power to certain on-board devices. > > Although the underlying hardware supports various pin config settings > (input/output, open drain, etc.), this driver does not implement that > functionality and leaves it up to the firmware to configure things > properly. We also don't yet support interrupts/events. This is > sufficient for device power control, which is the only thing we need to > support at this point. More features will be implemented when needed. > > To our knowledge, only Apple Silicon Macs implement this SMC feature. > > Signed-off-by: Hector Martin <marcan@marcan.st> > Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > Reviewed-by: Sven Peter <sven@svenpeter.dev> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> > Signed-off-by: Sven Peter <sven@svenpeter.dev> > --- [snip] > + > + smcgp->gc.label = "macsmc-pmu-gpio"; > + smcgp->gc.owner = THIS_MODULE; > + smcgp->gc.get = macsmc_gpio_get; > + smcgp->gc.set = macsmc_gpio_set; I must have given my Reviewed-by under this driver before we started the conversion to the new GPIO driver setters. Could you please replace this with set_rv() as the old set() is now deprecated? > + smcgp->gc.get_direction = macsmc_gpio_get_direction; > + smcgp->gc.init_valid_mask = macsmc_gpio_init_valid_mask; > + smcgp->gc.can_sleep = true; > + smcgp->gc.ngpio = MAX_GPIO; > + smcgp->gc.base = -1; > + smcgp->gc.parent = &pdev->dev; > + Bart