From: Sekhar Nori <nsekhar@ti.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Kevin Hilman <khilman@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v2 4/6] ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx
Date: Tue, 2 Apr 2019 16:31:42 +0530 [thread overview]
Message-ID: <8346cd90-3558-479b-2129-8ae7915b3bda@ti.com> (raw)
In-Reply-To: <20190329093334.3885-5-brgl@bgdev.pl>
Hi Bart,
On 29/03/19 3:03 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> Instead of directly using the vbus GPIO we should model it as a fixed
> regulator. Add all necessary fix-ups for the regulator to be registered
> and configure the vbus GPIO as its enable pin.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> arch/arm/mach-davinci/board-omapl138-hawk.c | 49 +++++++++++++++++++--
> 1 file changed, 46 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
> index e244c8648594..0039b4d4c935 100644
> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c
> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
> @@ -21,6 +21,7 @@
> #include <linux/platform_data/mtd-davinci.h>
> #include <linux/platform_data/mtd-davinci-aemif.h>
> #include <linux/platform_data/ti-aemif.h>
> +#include <linux/regulator/fixed.h>
> #include <linux/regulator/machine.h>
>
> #include <asm/mach-types.h>
> @@ -298,15 +299,50 @@ static const short da850_hawk_usb11_pins[] = {
> -1
> };
>
> -static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
> +static struct regulator_consumer_supply hawk_usb_supplies[] = {
> + REGULATOR_SUPPLY("vbus", NULL),
> +};
> +
> +static struct regulator_init_data hawk_usb_vbus_data = {
> + .consumer_supplies = hawk_usb_supplies,
> + .num_consumer_supplies = ARRAY_SIZE(hawk_usb_supplies),
> +};
> +
> +static struct fixed_voltage_config hawk_usb_vbus = {
> + .supply_name = "vbus",
> + .microvolts = 3300000,
> + .init_data = &hawk_usb_vbus_data,
> +};
> +
> +static struct platform_device hawk_usb_vbus_device = {
> + .name = "reg-fixed-voltage",
> + .id = 1,
Can you explain choice of of 1 for id here? Its the first fixed
regulator being registered. Shouldn't it be 0?
Thanks,
Sekhar
next prev parent reply other threads:[~2019-04-02 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 9:33 [PATCH v2 0/6] ARM: davinci: ohci-da8xx: model the vbus GPIO as a fixed regulator Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables Bartosz Golaszewski
[not found] ` <20190330134525.0C68A218AC@mail.kernel.org>
2019-03-30 17:08 ` Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 2/6] usb: ohci-da8xx: let the regulator framework keep track of use count Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 3/6] usb: ohci-da8xx: disable the regulator if the overcurrent irq fired Bartosz Golaszewski
2019-04-03 15:36 ` Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 4/6] ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx Bartosz Golaszewski
2019-04-02 11:01 ` Sekhar Nori [this message]
2019-04-02 12:00 ` Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 5/6] ARM: davinci: da830-evm: " Bartosz Golaszewski
2019-03-29 9:33 ` [PATCH v2 6/6] usb: ohci-da8xx: drop the vbus GPIO Bartosz Golaszewski
2019-03-29 14:02 ` [PATCH v2 0/6] ARM: davinci: ohci-da8xx: model the vbus GPIO as a fixed regulator Alan Stern
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=8346cd90-3558-479b-2129-8ae7915b3bda@ti.com \
--to=nsekhar@ti.com \
--cc=bgolaszewski@baylibre.com \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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
all inboxes | Powered by JetHome®