From: Matthias Brugger <matthias.bgg@gmail.com>
To: Hsin-Yi Wang <hsinyi@chromium.org>, Wolfram Sang <wsa@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: linux-i2c@vger.kernel.org, Qii Wang <qii.wang@mediatek.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Bibby Hsieh <bibby.hsieh@mediatek.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v21 3/5] i2c: mediatek: mt65xx: add optional vbus-supply
Date: Wed, 12 May 2021 17:46:07 +0200 [thread overview]
Message-ID: <6e971f16-a325-34cd-faaa-cfd51db86c66@gmail.com> (raw)
In-Reply-To: <20210507131406.2224177-4-hsinyi@chromium.org>
On 07/05/2021 15:14, Hsin-Yi Wang wrote:
> Add vbus-supply which provides power to SCL/SDA. Pass this regulator
> into core so it can be turned on/off for low power mode support.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/i2c/busses/i2c-mt65xx.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index 5ddfa4e56ee2..22d1d14b5de5 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -1220,6 +1220,13 @@ static int mtk_i2c_probe(struct platform_device *pdev)
> i2c->adap.quirks = i2c->dev_comp->quirks;
> i2c->adap.timeout = 2 * HZ;
> i2c->adap.retries = 1;
> + i2c->adap.bus_regulator = devm_regulator_get_optional(&pdev->dev, "vbus");
> + if (IS_ERR(i2c->adap.bus_regulator)) {
> + if (PTR_ERR(i2c->adap.bus_regulator) == -ENODEV)
> + i2c->adap.bus_regulator = NULL;
> + else
> + return PTR_ERR(i2c->adap.bus_regulator);
> + }
>
> ret = mtk_i2c_parse_dt(pdev->dev.of_node, i2c);
> if (ret)
>
next prev parent reply other threads:[~2021-05-12 16:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 13:14 [PATCH v21 0/5] add power control in i2c Hsin-Yi Wang
2021-05-07 13:14 ` [PATCH v21 1/5] i2c: core: support bus regulator controlling in adapter Hsin-Yi Wang
2021-05-12 15:45 ` Matthias Brugger
2021-05-07 13:14 ` [PATCH v21 2/5] dt-binding: i2c: mt65xx: add vbus-supply property Hsin-Yi Wang
2021-05-07 13:14 ` [PATCH v21 3/5] i2c: mediatek: mt65xx: add optional vbus-supply Hsin-Yi Wang
2021-05-12 15:46 ` Matthias Brugger [this message]
2021-05-17 8:06 ` Qii Wang
2021-05-07 13:14 ` [PATCH v21 4/5] misc: eeprom: at24: check suspend status before disable regulator Hsin-Yi Wang
2021-05-07 13:14 ` [PATCH v21 5/5] arm64: dts: mt8183: add supply name for eeprom Hsin-Yi Wang
2021-05-20 10:56 ` [PATCH v21 0/5] add power control in i2c Hsin-Yi Wang
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=6e971f16-a325-34cd-faaa-cfd51db86c66@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=arnd@arndb.de \
--cc=bgolaszewski@baylibre.com \
--cc=bibby.hsieh@mediatek.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsinyi@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=qii.wang@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=wsa@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).