mbox series

[v2,0/2] Add Apple macsmc GPIO support

Message ID Y1vZprz7t1WRW3bz@shell.armlinux.org.uk
Headers show
Series Add Apple macsmc GPIO support | expand

Message

Russell King (Oracle) Oct. 28, 2022, 1:31 p.m. UTC
Hi,

This series adds support for the Apple Mac SMC GPIO driver that was
previously posted before the last merge window. I believe all previous
review points have been addressed.

This series is smaller than the previous posting because I'm splitting
this up to allow progress to be made; this driver is dependent on the
Apple SMC driver in order to be buildable and usable. It is expected
that this Apple SMC driver will be merged via Lee's MFD tree. The
Kconfig dependencies this driver from causing build issues until that
driver is also merged, so I believe it is appropriate to send this
separately.

There is no issue if we wish to delay applying this until the core
driver has been accepted by Lee.

The series is made up of two patches - one patch for the bindings,
which now include two compatibles, one specific and one generic. The
second patch adds the actual driver itself.

v2: updated bindings document

 .../devicetree/bindings/gpio/gpio-macsmc.yaml      |  41 ++++
 drivers/gpio/Kconfig                               |  11 +
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-macsmc.c                         | 245 +++++++++++++++++++++
 4 files changed, 298 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
 create mode 100644 drivers/gpio/gpio-macsmc.c

Comments

Russell King (Oracle) Oct. 28, 2022, 3:05 p.m. UTC | #1
On Fri, Oct 28, 2022 at 02:32:02PM +0100, Russell King (Oracle) wrote:
> Add the DT binding for the Apple Mac System Management Controller GPIOs.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
>  .../devicetree/bindings/gpio/gpio-macsmc.yaml | 41 +++++++++++++++++++

Sorry, just realised I hadn't renamed this file. I'll do that for v3.
Please review assuming I've made that change.

>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml b/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
> new file mode 100644
> index 000000000000..2bb8faa2c08c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/gpio-macsmc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple Mac System Management Controller GPIO
> +
> +maintainers:
> +  - Hector Martin <marcan@marcan.st>
> +
> +description:
> +  This describes the binding for the Apple Mac System Management Controller
> +  GPIO block.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8103-smc-gpio
> +      - const: apple,smc-gpio
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +required:
> +  - compatible
> +  - gpio-controller
> +  - '#gpio-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    gpio {
> +        compatible = "apple,t8103-smc-gpio", "apple,smc-gpio";
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +    };
> -- 
> 2.30.2
> 
>
Krzysztof Kozlowski Oct. 28, 2022, 8:37 p.m. UTC | #2
On 28/10/2022 11:05, Russell King (Oracle) wrote:
> On Fri, Oct 28, 2022 at 02:32:02PM +0100, Russell King (Oracle) wrote:
>> Add the DT binding for the Apple Mac System Management Controller GPIOs.
>>
>> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
>> ---
>>  .../devicetree/bindings/gpio/gpio-macsmc.yaml | 41 +++++++++++++++++++
> 
> Sorry, just realised I hadn't renamed this file. I'll do that for v3.
> Please review assuming I've made that change.

v3 is needed anyway for the tooling/automated checks.

> 
>>  1 file changed, 41 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml b/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
>> new file mode 100644
>> index 000000000000..2bb8faa2c08c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gpio/gpio-macsmc.yaml
>> @@ -0,0 +1,41 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/gpio/gpio-macsmc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Apple Mac System Management Controller GPIO
>> +
>> +maintainers:
>> +  - Hector Martin <marcan@marcan.st>
>> +
>> +description:
>> +  This describes the binding for the Apple Mac System Management Controller

Missing change. Drop "This describes the binding for". This is a
description of hardware.

Rest looks good.

>> +  GPIO block.
Best regards,
Krzysztof