From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: thierry.reding@gmail.com, linus.walleij@linaro.org,
gnurou@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com,
jonathanh@nvidia.com, linux-tegra@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 4/7] soc/tegra: pmc: Add interface to set voltage of IO rails
Date: Fri, 15 Apr 2016 10:41:57 -0600 [thread overview]
Message-ID: <571119D5.3040309@wwwdotorg.org> (raw)
In-Reply-To: <57111524.60708@nvidia.com>
On 04/15/2016 10:21 AM, Laxman Dewangan wrote:
>
> On Friday 15 April 2016 09:54 PM, Stephen Warren wrote:
>> On 04/12/2016 08:56 AM, Laxman Dewangan wrote:
>>> NVIDIA Tegra210 supports some of the IO interface which can operate
>>> at 1.8V or 3.3V I/O rail voltage levels. SW needs to configure
>>> Tegra PMC register to set different voltage level of IO interface based
>>> on IO rail voltage from power supply i.e. power regulators.
>>>
>>> Add APIs to set and get IO rail voltage from the client driver.
>>
>>> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
>>
>>> +static struct tegra_io_rail_voltage_bit_info
>>> tegra210_io_rail_voltage_info[] = {
>>> + TEGRA_IO_RAIL_VOLTAGE(SDMMC1, 12),
>>> + TEGRA_IO_RAIL_VOLTAGE(SDMMC3, 13),
>>> + TEGRA_IO_RAIL_VOLTAGE(AUDIO_HV, 18),
>>> + TEGRA_IO_RAIL_VOLTAGE(DMIC, 20),
>>> + TEGRA_IO_RAIL_VOLTAGE(GPIO, 21),
>>> + TEGRA_IO_RAIL_VOLTAGE(SPI_HV, 23),
>>> +};
>>
>> That table is likely specific to Tegra210, yet ...
>>
>>> +static int tegra_io_rail_voltage_get_bit_pos(int io_rail_id)
>>> +int tegra_io_rail_voltage_set(int io_rail, int val)
>>> +int tegra_io_rail_voltage_get(int io_rail)
>>
>> ... these functions are all named as if they are generic. Presumably
>> they will indeed be needed for the next chip too? How will you prevent
>> their use, or turn these functions into no-ops, or return errors, on
>> other SoCs?
>
> It will return error for the Soc which does to support or the parameter
> to the apis which are not applicable.
Are you saying that will happen in the current code? I don't see where
there's anything that validates that.
Or does "will" mean "I will do that in the next patch revision"?
next prev parent reply other threads:[~2016-04-15 16:42 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 14:56 [PATCH 0/7] pinctrl: soc/tegra: Add support to configure IO rail voltage and pad power states Laxman Dewangan
2016-04-12 14:56 ` [PATCH 1/7] soc/tegra: pmc: Use BIT macro for register field definition Laxman Dewangan
2016-04-12 15:26 ` Thierry Reding
2016-04-12 16:58 ` Laxman Dewangan
2016-04-15 7:44 ` Linus Walleij
2016-04-12 14:56 ` [PATCH 2/7] soc/tegra: pmc: Add new Tegra210 IO rails Laxman Dewangan
2016-04-12 15:28 ` Thierry Reding
2016-04-12 16:59 ` Laxman Dewangan
2016-04-12 18:03 ` Jon Hunter
2016-04-12 17:57 ` Laxman Dewangan
2016-04-12 14:56 ` [PATCH 3/7] soc/tegra: pmc: Add interface to get IO rail power status Laxman Dewangan
2016-04-12 18:06 ` kbuild test robot
2016-04-12 18:13 ` Jon Hunter
2016-04-12 14:56 ` [PATCH 4/7] soc/tegra: pmc: Add interface to set voltage of IO rails Laxman Dewangan
2016-04-13 8:47 ` Jon Hunter
2016-04-13 9:00 ` Laxman Dewangan
2016-04-13 9:25 ` Jon Hunter
2016-04-13 9:20 ` Laxman Dewangan
2016-04-13 9:56 ` Jon Hunter
2016-04-15 7:54 ` Linus Walleij
2016-04-15 8:00 ` Mark Brown
2016-04-15 8:25 ` Laxman Dewangan
2016-04-15 9:19 ` Linus Walleij
2016-04-15 16:24 ` Stephen Warren
2016-04-15 16:21 ` Laxman Dewangan
2016-04-15 16:41 ` Stephen Warren [this message]
2016-04-15 16:33 ` Laxman Dewangan
2016-04-15 16:59 ` Stephen Warren
2016-04-12 14:56 ` [PATCH 5/7] soc/tegra: pmc: Register sub-devices of PMC Laxman Dewangan
2016-04-15 16:31 ` Stephen Warren
2016-04-12 14:56 ` [PATCH 6/7] pinctrl: tegra: Add DT binding for io pads control Laxman Dewangan
2016-04-13 9:04 ` Jon Hunter
2016-04-13 9:08 ` Laxman Dewangan
2016-04-13 9:31 ` Jon Hunter
2016-04-15 14:16 ` Jon Hunter
2016-04-15 14:12 ` Laxman Dewangan
2016-04-15 15:14 ` Jon Hunter
2016-04-15 15:14 ` Laxman Dewangan
2016-04-15 15:45 ` Jon Hunter
2016-04-15 16:41 ` Laxman Dewangan
2016-04-15 17:44 ` Jon Hunter
2016-04-15 17:49 ` Laxman Dewangan
2016-04-15 18:30 ` Jon Hunter
2016-04-15 18:43 ` Laxman Dewangan
2016-04-15 16:35 ` Stephen Warren
2016-04-15 16:31 ` Laxman Dewangan
2016-04-12 14:56 ` [PATCH 7/7] pinctrl: tegra: Add driver to configure voltage and power state of io pads Laxman Dewangan
2016-04-15 8:08 ` Linus Walleij
2016-04-15 8:39 ` Laxman Dewangan
2016-04-15 9:25 ` Linus Walleij
2016-04-15 9:55 ` Laxman Dewangan
2016-04-15 11:15 ` Linus Walleij
2016-04-15 11:47 ` Laxman Dewangan
2016-04-15 14:03 ` Linus Walleij
2016-04-15 13:59 ` Laxman Dewangan
2016-04-19 9:49 ` Laxman Dewangan
2016-04-26 13:32 ` Laxman Dewangan
2016-04-26 15:31 ` Stephen Warren
2016-04-15 16:38 ` Stephen Warren
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=571119D5.3040309@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
/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).