From: Lee Jones <lee.jones@linaro.org>
To: Emil Renner Berthing <kernel@esmil.dk>
Cc: Rob Herring <robh+dt@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
"Andrew F. Davis" <afd@ti.com>,
devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/3] mfd: tps65086: Make interrupt line optional
Date: Tue, 20 Jul 2021 16:07:06 +0100 [thread overview]
Message-ID: <YPbmmqfOuE5w6EgW@google.com> (raw)
In-Reply-To: <20210625224744.1020108-3-kernel@esmil.dk>
On Sat, 26 Jun 2021, Emil Renner Berthing wrote:
> The BeagleV Starlight v0.9 board[1] doesn't have the IRQB line routed to
> the SoC, but it is still useful to be able to reach the PMIC over I2C
> for the other functionality it provides.
>
> [1] https://github.com/beagleboard/beaglev-starlight
>
> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> ---
> .../devicetree/bindings/mfd/ti,tps65086.yaml | 3 ---
This is not present in my current tree.
Looks like it's still *.txt.
Am I missing a patch?
> drivers/mfd/tps65086.c | 21 ++++++++++---------
> 2 files changed, 11 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/ti,tps65086.yaml b/Documentation/devicetree/bindings/mfd/ti,tps65086.yaml
> index ba638bd10a58..4b629fcc0df9 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,tps65086.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,tps65086.yaml
> @@ -87,9 +87,6 @@ additionalProperties: false
> required:
> - compatible
> - reg
> - - interrupts
> - - interrupt-controller
> - - '#interrupt-cells'
> - gpio-controller
> - '#gpio-cells'
> - regulators
> diff --git a/drivers/mfd/tps65086.c b/drivers/mfd/tps65086.c
> index 341466ef20cc..cc3478ee9a64 100644
> --- a/drivers/mfd/tps65086.c
> +++ b/drivers/mfd/tps65086.c
> @@ -100,29 +100,30 @@ static int tps65086_probe(struct i2c_client *client,
> (char)((version & TPS65086_DEVICEID_OTP_MASK) >> 4) + 'A',
> (version & TPS65086_DEVICEID_REV_MASK) >> 6);
>
> - ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0,
> - &tps65086_irq_chip, &tps->irq_data);
> - if (ret) {
> - dev_err(tps->dev, "Failed to register IRQ chip\n");
> - return ret;
> + if (tps->irq > 0) {
> + ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0,
> + &tps65086_irq_chip, &tps->irq_data);
> + if (ret) {
> + dev_err(tps->dev, "Failed to register IRQ chip\n");
> + return ret;
> + }
> }
>
> ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65086_cells,
> ARRAY_SIZE(tps65086_cells), NULL, 0,
> regmap_irq_get_domain(tps->irq_data));
> - if (ret) {
> + if (ret && tps->irq > 0)
> regmap_del_irq_chip(tps->irq, tps->irq_data);
> - return ret;
> - }
>
> - return 0;
> + return ret;
> }
>
> static int tps65086_remove(struct i2c_client *client)
> {
> struct tps65086 *tps = i2c_get_clientdata(client);
>
> - regmap_del_irq_chip(tps->irq, tps->irq_data);
> + if (tps->irq > 0)
> + regmap_del_irq_chip(tps->irq, tps->irq_data);
>
> return 0;
> }
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2021-07-20 15:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 22:47 [PATCH v1 0/3] BeagleV Starlight reset support Emil Renner Berthing
2021-06-25 22:47 ` [PATCH v1 1/3] dt-bindings: mfd: convert tps65086.txt to YAML Emil Renner Berthing
2021-07-14 20:44 ` Rob Herring
2021-07-14 20:59 ` Emil Renner Berthing
2021-06-25 22:47 ` [PATCH v1 2/3] mfd: tps65086: Make interrupt line optional Emil Renner Berthing
2021-07-13 9:18 ` Lee Jones
2021-07-14 20:38 ` Rob Herring
2021-07-15 11:13 ` Lee Jones
2021-07-15 11:27 ` Emil Renner Berthing
2021-07-14 20:44 ` Rob Herring
2021-07-20 15:07 ` Lee Jones [this message]
2021-07-20 15:09 ` Emil Renner Berthing
2021-07-20 15:32 ` Lee Jones
2021-07-20 15:36 ` Emil Renner Berthing
2021-07-20 16:07 ` Lee Jones
2021-07-20 16:18 ` Emil Renner Berthing
2021-07-20 16:29 ` Lee Jones
2021-06-25 22:47 ` [PATCH v1 3/3] power: reset: Add TPS65086 restart driver Emil Renner Berthing
2021-07-20 16:12 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YPbmmqfOuE5w6EgW@google.com \
--to=lee.jones@linaro.org \
--cc=afd@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=kernel@esmil.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).