gpio: siul2-s32g2: add initial GPIO driver
Subsystems (3)
v2 cover gpio: siul2-s32g2: add initial GPIO driver
This patch series adds support for basic GPIO operations(set, get, direction_output/input, set_config).
There are two SIUL2 hardware modules: SIUL2_0 and SIUL2_1. However, this driver exports both as a single GPIO driver. This is because the interrupt registers are located only in SIUL2_1, even for GPIOs that are part of SIUL2_0.
There are two gaps in the GPIO ranges:
- 102-111(inclusive) are invalid
- 123-143(inclusive) are invalid
These will be excluded via the gpio-reserved-ranges property.
Writing and reading GPIO values is done via the PGPDO/PGPDI registers(Parallel GPIO Pad Data Output/Input) which are 16 bit registers, each bit corresponding to a GPIO.
Note that the PGPDO order is similar to a big-endian grouping of two registers:
PGPDO1, PGPDO0, PGPDO3, PGPDO2, PGPDO5, PGPDO4, gap, PGPDO6.
I have other patches for this driver:
- interrupt support
- power management callbacks
which I plan to upstream after this series gets merged in order to simplify the review process.
v2 -> v1
dt-bindings:
- changed filename to match compatible
- fixed commit messages
- removed dt-bindings unnecessary properties descriptions
- added minItems for the interrupts property driver:
- added depends on ARCH_S32 || COMPILE_TEST to Kconfig
- added select REGMAP_MMIO to Kconfig
- remove unnecessary include
- add of_node_put after siul2_get_gpio_pinspec
- removed inline from function definitions
- removed match data and moved the previous platdata definition to the top of the file to be visible
- replace bitmap_set/clear with __clear_bit/set_bit and devm_bitmap_zalloc with devm_kzalloc
- switched to gpiochip_generic_request/free/config
- fixed dev_err format for size_t reported by kernel test robot
- add platform_get_and_ioremap_resource_byname wrapper
Andrei Stefanescu (4):
drivers: provide devm_platform_get_and_ioremap_resource_byname()
dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support
MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
.../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++ MAINTAINERS | 2 + drivers/base/platform.c | 28 + drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-siul2-s32g2.c | 581 ++++++++++++++++++ include/linux/platform_device.h | 13 + 7 files changed, 741 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml create mode 100644 drivers/gpio/gpio-siul2-s32g2.c
Signature · 1 line
2.45.2
PATCH v2 1/4 drivers: provide devm_platform_get_and_ioremap_resource_byname()
Similar to commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()") add a wrapper for "platform_get_resource_byname" and "devm_ioremap_resource". This new wrapper also returns the resource, if any, via a pointer.
--- drivers/base/platform.c | 28 ++++++++++++++++++++++++++++ include/linux/platform_device.h | 13 +++++++++++++ 2 files changed, 41 insertions(+)
drivers/base/platform.c +28 -0
@@ -108,6 +108,34 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev, }EXPORT_SYMBOL_GPL (devm_platform_get_and_ioremap_resource); +/** +* devm_platform_get_and_ioremap_resource_byname - call devm_ioremap_resource() +* for a platform device and get +* a resource by its name instead +* of the index +* +* @pdev: platform device to use both for memory resource lookup as well as +* resource management +* @name: resource name +* @res: optional output parameter to store a pointer to the obtained resource. +* +* Return: a pointer to the remapped memory or an ERR_PTR() encoded error code +* on failure. +*/ +void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res) +{ +struct resource *r; + + r =platform_get_resource_byname (pdev,IORESOURCE_MEM , name); +if (res) + *res = r; +return devm_ioremap_resource (&pdev->dev, r); +} +EXPORT_SYMBOL_GPL (devm_platform_get_and_ioremap_resource_byname); +/** * devm_platform_ioremap_resource - call devm_ioremap_resource() for a platform * device
include/linux/platform_device.h +13 -0
@@ -68,6 +68,12 @@ platform_find_device_by_driver(struct device *start,extern void __iomem *devm_platform_get_and_ioremap_resource (struct platform_device *pdev,unsigned int index,struct resource **res); + +extern void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res); +extern void __iomem *devm_platform_ioremap_resource (struct platform_device *pdev,unsigned int index);
@@ -83,6 +89,13 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev,return ERR_PTR (-EINVAL ); } +static inline void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res) +{ +return ERR_PTR (-EINVAL ); +}static inline void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev,
Signature · 1 line
2.45.2
Re: [PATCH v2 1/4] drivers: provide devm_platform_get_and_ioremap_resource_byname()
Quoted 17 lines · Andrei Stefanescu
Similar to commit
890cc39a879906b63912482dfc41944579df2dc6("drivers: providedevm_platform_get_and_ioremap_resource()") add a wrapper for "platform_get_resource_byname" and "devm_ioremap_resource". This new wrapper also returns the resource, if any, via a pointer.Suggested-by Krzysztof Kozlowski <[email protected]>Signed-off-by Andrei Stefanescu <[email protected]> > ---drivers/base/platform.c | 28 ++++++++++++++++++++++++++++ include/linux/platform_device.h | 13 +++++++++++++ 2 files changed, 41 insertions(+)drivers/base/platform.c +0
-0
drivers/base/platform.c devm_platform_get_and_ioremap_resource(struct platform_device *pdev, · line 115
Quoted 8 lines
drivers/base/platform.c +5
-0@@ -108,6 +108,34 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev, }EXPORT_SYMBOL_GPL (devm_platform_get_and_ioremap_resource); +/** +* devm_platform_get_and_ioremap_resource_byname - call devm_ioremap_resource() +* for a platform device and get +* a resource by its name instead +* of the index
I think we don't need to describe what the function does not do.
With that:
Quoted 57 lines
drivers/base/platform.c +23
-0+* +* @pdev: platform device to use both for memory resource lookup as well as +* resource management +* @name: resource name +* @res: optional output parameter to store a pointer to the obtained resource. +* +* Return: a pointer to the remapped memory or an ERR_PTR() encoded error code +* on failure. +*/ +void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res) +{ +struct resource *r; + + r =platform_get_resource_byname (pdev,IORESOURCE_MEM , name); +if (res) + *res = r; +return devm_ioremap_resource (&pdev->dev, r); +} +EXPORT_SYMBOL_GPL (devm_platform_get_and_ioremap_resource_byname); +/** * devm_platform_ioremap_resource - call devm_ioremap_resource() for a platform * device include/linux/platform_device.h +13
-0@@ -68,6 +68,12 @@ platform_find_device_by_driver(struct device *start,extern void __iomem *devm_platform_get_and_ioremap_resource (struct platform_device *pdev,unsigned int index,struct resource **res); + +extern void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res); +extern void __iomem *devm_platform_ioremap_resource (struct platform_device *pdev,unsigned int index);@@ -83,6 +89,13 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev,return ERR_PTR (-EINVAL ); } +static inline void __iomem * +devm_platform_get_and_ioremap_resource_byname (struct platform_device *pdev, +const char *name, +struct resource **res) +{ +return ERR_PTR (-EINVAL ); +}static inline void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev,
PATCH v2 2/4 dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
In reply to Andrei StefanescuAdd support for the GPIO driver of the NXP S32G2/S32G3 SoCs.
--- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +106 -0
@@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2 SIUL2 GPIO controller + +maintainers: + - Ghennadi Procopciuc <[email protected]> + - Larisa Grigore <[email protected]> + - Andrei Stefanescu <[email protected]> + +description: + Support for the SIUL2 GPIOs found on the S32G2 and S32G3 + chips. It includes an IRQ controller for all pins which have + an EIRQ associated. + +properties: + compatible: + items: + - const: nxp,s32g2-siul2-gpio + + reg: + items: + - description: PGPDO (output value) registers for SIUL2_0 + - description: PGPDO (output value) registers for SIUL2_1 + - description: PGPDI (input value) registers for SIUL2_0 + - description: PGPDI (input value) registers for SIUL2_1 + - description: EIRQ (interrupt) configuration registers from SIUL2_1 + - description: EIRQ IMCR registers for interrupt muxing between pads + + reg-names: + items: + - const: opads0 + - const: opads1 + - const: ipads0 + - const: ipads1 + - const: eirqs + - const: eirq-imcrs + + gpio-controller: true + + '#gpio-cells': + const: 2 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + gpio-ranges: + minItems: 2 + + gpio-reserved-ranges: + minItems: 2 + +patternProperties: + "-hog(-[0-9]+)?$": + required: + - gpio-hog + +required: + - compatible + - reg + - reg-names + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - gpio-reserved-ranges + - interrupts + - interrupt-controller + - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + gpio: siul2-gpio@4009d700 { + compatible = "nxp,s32g2-siul2-gpio"; + reg = <0x4009d700 0x10>, + <0x44011700 0x18>, + <0x4009d740 0x10>, + <0x44011740 0x18>, + <0x44010010 0xb4>, + <0x44011078 0x80>; + reg-names = "opads0", "opads1", "ipads0", + "ipads1", "eirqs", "eirq-imcrs"; + gpio-controller; + #gpio-cells = <2>; + /* GPIO 0-101 */ + gpio-ranges = <&pinctrl 0 0 102>, + /* GPIO 112-190 */ + <&pinctrl 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + };
Signature · 1 line
2.45.2
Rob Herring (Arm)
maintainerRe: [PATCH v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
Quoted 11 lines · Andrei Stefanescu
Add support for the GPIO driver of the NXP S32G2/S32G3 SoCs.
Signed-off-by Phu Luu An <[email protected]>Signed-off-by Larisa Grigore <[email protected]>Signed-off-by Ghennadi Procopciuc <[email protected]>Signed-off-by Andrei Stefanescu <[email protected]>--- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.yaml
file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
Hi,
Quoted 23 lines · Rob Herring (Arm)
Quoted 11 lines · Andrei Stefanescu
Add support for the GPIO driver of the NXP S32G2/S32G3 SoCs.
Signed-off-by Phu Luu An <[email protected]>Signed-off-by Larisa Grigore <[email protected]>Signed-off-by Ghennadi Procopciuc <[email protected]>Signed-off-by Andrei Stefanescu <[email protected]>--- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yamlMy bot found errors running 'make
dt_binding_check' on your patch:yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename(quoted diff) +0
-0$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.yaml file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml
Quoted 2 lines
doc reference errors (make refcheckdocs):
I am sorry for this, I forgot to run the 'dt_binding_check' on this version. I will wait a bit for other comments and I will fix in v3.
Best regards,
Andrei
Rob Herring
maintainerRe: [PATCH v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
In reply to Andrei StefanescuQuoted 64 lines · Andrei Stefanescu
Add support for the GPIO driver of the NXP S32G2/S32G3 SoCs.
Signed-off-by Phu Luu An <[email protected]>Signed-off-by Larisa Grigore <[email protected]>Signed-off-by Ghennadi Procopciuc <[email protected]>Signed-off-by Andrei Stefanescu <[email protected]>--- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yamlDocumentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +47
-0@@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2 SIUL2 GPIO controller + +maintainers: + - Ghennadi Procopciuc <[email protected]> + - Larisa Grigore <[email protected]> + - Andrei Stefanescu <[email protected]> + +description: + Support for the SIUL2 GPIOs found on the S32G2 and S32G3 + chips. It includes an IRQ controller for all pins which have + an EIRQ associated. + +properties: + compatible: + items: + - const: nxp,s32g2-siul2-gpio + + reg: + items: + - description: PGPDO (output value) registers for SIUL2_0 + - description: PGPDO (output value) registers for SIUL2_1 + - description: PGPDI (input value) registers for SIUL2_0 + - description: PGPDI (input value) registers for SIUL2_1 + - description: EIRQ (interrupt) configuration registers from SIUL2_1 + - description: EIRQ IMCR registers for interrupt muxing between pads + + reg-names: + items: + - const: opads0 + - const: opads1 + - const: ipads0 + - const: ipads1 + - const: eirqs + - const: eirq-imcrs + + gpio-controller: true + + '#gpio-cells': + const: 2 +
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml line 57
Quoted 10 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +10
-0+ interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + gpio-ranges: + minItems: 2
This gets expanded to 'maxItems: 2'. Is that what you want? If not, maxItems should be explicit.
Quoted 19 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +19
-0+ + gpio-reserved-ranges: + minItems: 2 + +patternProperties: + "-hog(-[0-9]+)?$": + required: + - gpio-hog + +required: + - compatible + - reg + - reg-names + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - gpio-reserved-ranges + - interrupts + - interrupt-controller
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml line 86
Quoted 10 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +10
-0+ - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + gpio: siul2-gpio@4009d700 {
gpio@...
Drop unused label.
Quoted 23 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +20
-0+ compatible = "nxp,s32g2-siul2-gpio"; + reg = <0x4009d700 0x10>, + <0x44011700 0x18>, + <0x4009d740 0x10>, + <0x44011740 0x18>, + <0x44010010 0xb4>, + <0x44011078 0x80>; + reg-names = "opads0", "opads1", "ipads0", + "ipads1", "eirqs", "eirq-imcrs"; + gpio-controller; + #gpio-cells = <2>; + /* GPIO 0-101 */ + gpio-ranges = <&pinctrl 0 0 102>, + /* GPIO 112-190 */ + <&pinctrl 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + };Signature · 1 line
2.45.2
Re: [PATCH v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs
Hi Rob,
Thank you very much for the review!
Quoted 6 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml line 57
Quoted 3 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +3
-0+ + gpio-ranges: + minItems: 2This gets expanded to 'maxItems: 2'. Is that what you want? If not, maxItems should be explicit.
Yes, 'maxItems: 2' is what I want but I can also add 'maxItems: 2' in v3 to be explicit/more clear about it.
Quoted 9 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml line 86
Quoted 5 lines
Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file +5
-0+ - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + gpio: siul2-gpio@4009d700 {gpio@...
Drop unused label.
I will fix in v3.
Best regards,
Andrei
PATCH v2 3/4 gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support
In reply to Andrei StefanescuAdd the GPIO driver for S32G2/S32G3 SoCs. This driver uses the SIUL2 (System Integration Unit Lite2) hardware module. There are two SIUL2 hardware modules present, SIUL2_0(controlling GPIOs 0-101) and SIUL2_1 for the rest.
The GPIOs are not fully contiguous, there are some gaps:
- GPIO102 up to GPIO111(inclusive) are invalid
- GPIO123 up to GPIO143(inclusive) are invalid
Some GPIOs are input only(i.e. GPI182) though this restriction is not yet enforced in code.
This patch adds basic GPIO functionality(no interrupts, no suspend/resume functions).
--- drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-siul2-s32g2.c | 581 ++++++++++++++++++++++++++++++++ 3 files changed, 592 insertions(+) create mode 100644 drivers/gpio/gpio-siul2-s32g2.c
drivers/gpio/Kconfig +10 -0
@@ -643,6 +643,16 @@ config GPIO_SIOX Say yes here to support SIOX I/O devices. These are units connected via a SIOX bus and have a number of fixed-direction I/O lines. +config GPIO_SIUL2_S32G2 + tristate "GPIO driver for S32G2/S32G3" + depends on ARCH_S32 || COMPILE_TEST + depends on OF_GPIO + select REGMAP_MMIO + help + This enables support for the SIUL2 GPIOs found on the S32G2/S32G3 + chips. Say yes here to enable the SIUL2 to be used as an GPIO + controller for S32G2/S32G3 platforms. + config GPIO_SNPS_CREG bool "Synopsys GPIO via CREG (Control REGisters) driver" depends on ARC || COMPILE_TEST
drivers/gpio/Makefile +1 -0
@@ -149,6 +149,7 @@ obj-$(CONFIG_GPIO_SCH) += gpio-sch.o obj-$(CONFIG_GPIO_SIFIVE) += gpio-sifive.o obj-$(CONFIG_GPIO_SIM) += gpio-sim.o obj-$(CONFIG_GPIO_SIOX) += gpio-siox.o +obj-$(CONFIG_GPIO_SIUL2_S32G2) += gpio-siul2-s32g2.o obj-$(CONFIG_GPIO_SL28CPLD) += gpio-sl28cpld.o obj-$(CONFIG_GPIO_SLOPPY_LOGIC_ANALYZER) += gpio-sloppy-logic-analyzer.o obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o
drivers/gpio/gpio-siul2-s32g2.c new file +581 -0
581 lines not on this page · raw message
Signature · 1 line
2.45.2
Re: [PATCH v2 3/4] gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support
…
Quoted 2 lines
+++
b/drivers/gpio/gpio-siul2-s32g2.c(quoted diff) +0
-0@@ -0,0 +1,581 @@
…
Quoted 6 lines
drivers/gpio/gpio-siul2-s32g2.c new file +6
-0+static void siul2_gpio_set_direction (struct siul2_gpio_dev *dev, +unsigned int gpio,int dir) +{ +unsigned long flags; + +raw_spin_lock_irqsave (&dev->lock, flags);
…
Review
Quoted 2 lines
(quoted diff) +2
-0+ raw_spin_unlock_irqrestore(&dev->lock, flags); +}
…
Under which circumstances would you become interested to apply a statement like “guard(raw_spinlock_irqsave)(&dev->lock);”?
https://elixir.bootlin.com/linux/v6.11-rc7/source/include/linux/spinlock.h#L551
Regards,
Markus
Re: [PATCH v2 3/4] gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support
Hi Markus,
Quoted 11 lines · Markus Elfring
…
Quoted 2 lines
+++
b/drivers/gpio/gpio-siul2-s32g2.c(quoted diff) +0
-0@@ -0,0 +1,581 @@…
Quoted 6 lines
drivers/gpio/gpio-siul2-s32g2.c new file +6
-0+static void siul2_gpio_set_direction (struct siul2_gpio_dev *dev, +unsigned int gpio,int dir) +{ +unsigned long flags; + +raw_spin_lock_irqsave (&dev->lock, flags);…
Quoted 7 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ raw_spin_unlock_irqrestore(&dev->lock, flags); +}…
Under which circumstances would you become interested to apply a statement like “guard(raw_spinlock_irqsave)(&dev->lock);”?
https://elixir.bootlin.com/linux/v6.11-rc7/source/include/linux/spinlock.h#L551
Thank you very much for the suggestion! I will add it in v3.
Quoted 3 lines
Regards,
Markus
Best regards,
Andrei
PATCH v2 4/4 MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
In reply to Andrei Stefanescu--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin <[email protected]> R: Matthias Brugger <[email protected]> R: Ghennadi Procopciuc <[email protected]> +R: Andrei Stefanescu <[email protected]> L: NXP S32 Linux Team <[email protected]> L: [email protected] (moderated for non-subscribers) S: Maintained F: arch/arm64/boot/dts/freescale/s32g*.dts* +F: drivers/gpio/gpio-siul2-s32g2.c F: drivers/pinctrl/nxp/ ARM/Orion SoC/Technologic Systems TS-78xx platform support
Signature · 1 line
2.45.2
Greg Kroah-Hartman
maintainerRe: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
Quoted 1 line · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>
For obvious reasons, we can't take patches without any changelog text, even for simple stuff.
thanks,
greg k-h
Re: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
Hi Greg,
Quoted 9 lines · Greg Kroah-Hartman
Quoted 1 line · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>For obvious reasons, we can't take patches without any changelog text, even for simple stuff.
thanks,
greg k-h
Thank you! I will fix it in v3.
Best regards,
Andrei
Re: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
In reply to Andrei StefanescuQuoted 10 lines · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +0
-0
MAINTAINERS ARM/NXP S32G ARCHITECTURE · line 2692
Quoted 4 lines
MAINTAINERS +1
-0@@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin <[email protected]> R: Matthias Brugger <[email protected]> R: Ghennadi Procopciuc <[email protected]> +R: Andrei Stefanescu <[email protected]>
That's another patch where NXP adds silently themself as platform maintainer without explanation. Although here at least existing maintainers are Cced.
This looks like some pattern, so maybe clarifications are needed.
You wanted to be maintainer of this driver alone, right? So separate entry.
Best regards,
Krzysztof
Re: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
Hi Krzysztof,
Quoted 20 lines · Krzysztof Kozlowski
Quoted 10 lines · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +0
-0MAINTAINERS ARM/NXP S32G ARCHITECTURE · line 2692
Quoted 4 lines
MAINTAINERS +1
-0@@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin <[email protected]> R: Matthias Brugger <[email protected]> R: Ghennadi Procopciuc <[email protected]> +R: Andrei Stefanescu <[email protected]>That's another patch where NXP adds silently themself as platform maintainer without explanation. Although here at least existing maintainers are Cced.
Quoted 3 lines
This looks like some pattern, so maybe clarifications are needed.
You wanted to be maintainer of this driver alone, right? So separate entry.
I would actually want to become a maintainer for the platform. I have already added changes to the pinctrl driver and the s32g2.dtsi/s32g3.dtsi files. I intend to submit more patches to these files and I would like to review changes to them.
However, if you or any of the existing maintainers consider that I should only add myself as a maintainer for the SIUL2 GPIO driver, I can fix this in v3.
Quoted 4 lines
Best regards,
Krzysztof
Best regards,
Andrei
Re: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
Quoted 23 lines · Andrei Stefanescu
Hi Krzysztof,
Quoted 20 lines · Krzysztof Kozlowski
Quoted 10 lines · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +0
-0MAINTAINERS ARM/NXP S32G ARCHITECTURE · line 2692
Quoted 4 lines
MAINTAINERS +1
-0@@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin <[email protected]> R: Matthias Brugger <[email protected]> R: Ghennadi Procopciuc <[email protected]> +R: Andrei Stefanescu <[email protected]>That's another patch where NXP adds silently themself as platform maintainer without explanation. Although here at least existing maintainers are Cced.
Quoted 8 lines
Quoted 3 lines
This looks like some pattern, so maybe clarifications are needed.
You wanted to be maintainer of this driver alone, right? So separate entry.
I would actually want to become a maintainer for the platform. I have already added changes to the pinctrl driver and the
s32g2.dtsi/s32g3.dtsifiles. I intend to submit more patches to these files and I would like to review changes to them.
That's fine, so please provide some sort of message in the commit, describing your intention, document the commitment.
Quoted 3 lines
However, if you or any of the existing maintainers consider that I should only add myself as a maintainer for the SIUL2 GPIO driver, I can fix this in v3.
I assume you proposed this after consulting them? It is unusual to add yourself to maintainers without first talking to existing folks...
Best regards,
Krzysztof
Re: [PATCH v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver
Quoted 37 lines · Krzysztof Kozlowski
Quoted 23 lines · Andrei Stefanescu
Hi Krzysztof,
Quoted 20 lines · Krzysztof Kozlowski
Quoted 10 lines · Andrei Stefanescu
Signed-off-by Andrei Stefanescu <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +0
-0MAINTAINERS ARM/NXP S32G ARCHITECTURE · line 2692
Quoted 4 lines
MAINTAINERS +1
-0@@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin <[email protected]> R: Matthias Brugger <[email protected]> R: Ghennadi Procopciuc <[email protected]> +R: Andrei Stefanescu <[email protected]>That's another patch where NXP adds silently themself as platform maintainer without explanation. Although here at least existing maintainers are Cced.
Quoted 8 lines
Quoted 3 lines
This looks like some pattern, so maybe clarifications are needed.
You wanted to be maintainer of this driver alone, right? So separate entry.
I would actually want to become a maintainer for the platform. I have already added changes to the pinctrl driver and the
s32g2.dtsi/s32g3.dtsifiles. I intend to submit more patches to these files and I would like to review changes to them.That's fine, so please provide some sort of message in the commit, describing your intention, document the commitment.
Quoted 1 line
Quoted 5 lines
Quoted 2 lines
However, if you or any of the existing maintainers consider that I should only add myself as a maintainer for the SIUL2 GPIO driver, I can fix this in v3.
I assume you proposed this after consulting them? It is unusual to add yourself to maintainers without first talking to existing folks...
No, unfortunately I haven't consulted with them before proposing it here. I am sorry for that! I will add myself as a reviewer only for the SIUL2 GPIO driver in v3.
Quoted 5 lines
Best regards,
Krzysztof
Best regards,
Andrei