Re: [PATCH 6/6] pinctrl: tegra: Add driver to configure voltage and power state of io pads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/05/16 13:17, Laxman Dewangan wrote:
> NVIDIA Tegra210 supports the IO pads which can operate at 1.8V
> or 3.3V I/O voltage levels. Also the IO pads can be configured
> for power down state if it is not used. SW needs to configure the
> voltage level of IO pads based on IO rail voltage and its power
> state based on platform usage.
> 
> The voltage and power state configurations of pads are provided
> through pin control frameworks. Add pin control driver for Tegra's
> IO pads' voltage and power state configurations.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
> 
> ---
> Changes from V1:
> - Use the generic pincontrol property for low power enable/disable.
> - sync with latest and remove all MODULE* macros
> - Use renamed APIs form PMC
> ---
>  drivers/pinctrl/tegra/Makefile                  |   1 +
>  drivers/pinctrl/tegra/pinctrl-tegra210-io-pad.c | 301 ++++++++++++++++++++++++
>  2 files changed, 302 insertions(+)
>  create mode 100644 drivers/pinctrl/tegra/pinctrl-tegra210-io-pad.c

[snip]

> +static int tegra_io_pad_pinconf_get(struct pinctrl_dev *pctldev,
> +				    unsigned int pin, unsigned long *config)
> +{
> +	struct tegra_io_pads_info *tiopi = pinctrl_dev_get_drvdata(pctldev);
> +	int param = pinconf_to_config_param(*config);
> +	struct tegra_io_pads_cfg_info *pad_cfg = &tiopi->pads_cfg[pin];
> +	int pad_id = pad_cfg->pad_id;
> +	int arg = 0;
> +	int ret;
> +
> +	switch (param) {
> +	case TEGRA_IO_PAD_POWER_SOURCE_VOLTAGE:
> +		ret = tegra_io_pads_get_configured_voltage(pad_id);
> +		if (ret < 0)
> +			return ret;
> +		arg = (ret =  3300000) ? 1 : 0;

This should be (ret == 3300000).

Cheers
Jon

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux