Message ID | 20201201081146.31332-1-frieder.schrempf@kontron.de (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v2] NFC: nxp-nci: Make firmware GPIO pin optional | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 4 this patch: 4 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 4 this patch: 4 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Tue, Dec 1, 2020 at 10:12 AM Schrempf Frieder <frieder.schrempf@kontron.de> wrote: > > From: Frieder Schrempf <frieder.schrempf@kontron.de> > > There are other NXP NCI compatible NFC controllers such as the PN7150 > that use an integrated firmware and therefore do not have a GPIO to > select firmware downloading mode. To support these kind of chips, these -> this OR kind -> kinds > let's make the firmware GPIO optional. FWIW, Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> > > --- > Changes in v2: > * Remove unneeded null check for phy->gpiod_fw > --- > Documentation/devicetree/bindings/net/nfc/nxp-nci.txt | 2 +- > drivers/nfc/nxp-nci/i2c.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt > index cfaf88998918..cb2385c277d0 100644 > --- a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt > +++ b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt > @@ -6,11 +6,11 @@ Required properties: > - reg: address on the bus > - interrupts: GPIO interrupt to which the chip is connected > - enable-gpios: Output GPIO pin used for enabling/disabling the chip > -- firmware-gpios: Output GPIO pin used to enter firmware download mode > > Optional SoC Specific Properties: > - pinctrl-names: Contains only one value - "default". > - pintctrl-0: Specifies the pin control groups used for this controller. > +- firmware-gpios: Output GPIO pin used to enter firmware download mode > > Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2): > > diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c > index 9f60e4dc5a90..7e451c10985d 100644 > --- a/drivers/nfc/nxp-nci/i2c.c > +++ b/drivers/nfc/nxp-nci/i2c.c > @@ -286,7 +286,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, > return PTR_ERR(phy->gpiod_en); > } > > - phy->gpiod_fw = devm_gpiod_get(dev, "firmware", GPIOD_OUT_LOW); > + phy->gpiod_fw = devm_gpiod_get_optional(dev, "firmware", GPIOD_OUT_LOW); > if (IS_ERR(phy->gpiod_fw)) { > nfc_err(dev, "Failed to get FW gpio\n"); > return PTR_ERR(phy->gpiod_fw); > -- > 2.17.1 >
diff --git a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt index cfaf88998918..cb2385c277d0 100644 --- a/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt +++ b/Documentation/devicetree/bindings/net/nfc/nxp-nci.txt @@ -6,11 +6,11 @@ Required properties: - reg: address on the bus - interrupts: GPIO interrupt to which the chip is connected - enable-gpios: Output GPIO pin used for enabling/disabling the chip -- firmware-gpios: Output GPIO pin used to enter firmware download mode Optional SoC Specific Properties: - pinctrl-names: Contains only one value - "default". - pintctrl-0: Specifies the pin control groups used for this controller. +- firmware-gpios: Output GPIO pin used to enter firmware download mode Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2): diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index 9f60e4dc5a90..7e451c10985d 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -286,7 +286,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, return PTR_ERR(phy->gpiod_en); } - phy->gpiod_fw = devm_gpiod_get(dev, "firmware", GPIOD_OUT_LOW); + phy->gpiod_fw = devm_gpiod_get_optional(dev, "firmware", GPIOD_OUT_LOW); if (IS_ERR(phy->gpiod_fw)) { nfc_err(dev, "Failed to get FW gpio\n"); return PTR_ERR(phy->gpiod_fw);