linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: linus.walleij@linaro.org, robh+dt@kernel.org,
	mark.rutland@arm.com, swarren@wwwdotorg.org, gnurou@gmail.com,
	joe@perches.com, yamada.masahiro@socionext.com,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads
Date: Fri, 25 Nov 2016 23:15:05 +0530	[thread overview]
Message-ID: <583878A1.7090207@nvidia.com> (raw)
In-Reply-To: <2a767269-dc64-3639-2e14-7c6f57230dcf@nvidia.com>


On Friday 25 November 2016 10:56 PM, Jon Hunter wrote:
> On 25/11/16 09:57, Thierry Reding wrote:
>> * PGP Signed by an unknown key
>>
>> On Thu, Nov 24, 2016 at 02:08:54PM +0530, Laxman Dewangan wrote:
> ...
>
>>> diff --git a/drivers/pinctrl/tegra/pinctrl-tegra-io-pad.c b/drivers/pinctrl/tegra/pinctrl-tegra-io-pad.c
>>> new file mode 100644
>>> index 0000000..aab02d0
>>> --- /dev/null
>>> +++ b/drivers/pinctrl/tegra/pinctrl-tegra-io-pad.c
>>> @@ -0,0 +1,530 @@
>>> +/*
>>> + * pinctrl-tegra-io-pad: IO PAD driver for configuration of IO rail and deep
>>> + *			 Power Down mode via pinctrl framework.
>>> + *
>>> + * Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved.
>>> + *
>>> + * Author: Laxman Dewangan <ldewangan@nvidia.com>
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> + */
>>> +
>>> +#include <linux/delay.h>
>>> +#include <linux/module.h>
>>> +#include <linux/of.h>
>>> +#include <linux/pinctrl/pinctrl.h>
>>> +#include <linux/pinctrl/pinconf-generic.h>
>>> +#include <linux/pinctrl/pinconf.h>
>>> +#include <linux/pinctrl/pinmux.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/regulator/consumer.h>
>>> +#include <soc/tegra/pmc.h>
>> Have you considered moving this code into the PMC driver? It seems a
>> little over the top to go through all of the platform device creation
>> and driver registration dance only to call into a public API later on.
> I would prefer moving this under driver/soc/tegra as well (even if it is
> not in the same source file) so we don't need all this public APIs.
>

Do we really gain anything here by moving driver to drivers/soc/tegra?
The folder drivers/pinctrl/tegra is dedicated folder for Tegra specific.

We should keep the related driver in given subsystem until this is 
really hard to do it.
Even if we organise and move this driver to the driver/soc/tegra, we 
will need only 3-4 APIs from the public pmc header to the private header.

I think calling the tegra specific headers/APIs from tegra specific 
driver should be fine here.




  reply	other threads:[~2016-11-25 18:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  8:38 [PATCH V4 0/2] pinctrl: tegra: Add support for IO pad control Laxman Dewangan
2016-11-24  8:38 ` [PATCH V4 1/2] pinctrl: tegra: Add DT binding for io pads control Laxman Dewangan
     [not found]   ` <1479976734-30498-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-25  9:13     ` Thierry Reding
     [not found]       ` <20161125091354.GA11512-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-11-25 11:40         ` Laxman Dewangan
2016-11-25 17:19     ` Jon Hunter
2016-11-24  8:38 ` [PATCH V4 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads Laxman Dewangan
     [not found]   ` <1479976734-30498-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-25  9:57     ` Thierry Reding
2016-11-25 12:04       ` Laxman Dewangan
     [not found]         ` <583828D5.5060507-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-25 17:29           ` Jon Hunter
     [not found]             ` <da7b815c-149c-6baf-6691-a038d3fe54bf-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-25 17:49               ` Laxman Dewangan
     [not found]                 ` <583879A8.7020401-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-28  9:26                   ` Jon Hunter
     [not found]                     ` <4d255a3e-0816-498c-a280-6d29ca880e13-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-28  9:22                       ` Laxman Dewangan
     [not found]       ` <20161125095744.GB11512-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-11-25 17:26         ` Jon Hunter
2016-11-25 17:45           ` Laxman Dewangan [this message]
     [not found]             ` <583878A1.7090207-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-28  9:31               ` Jon Hunter
2016-12-04  3:31   ` kbuild test robot

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=583878A1.7090207@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=joe@perches.com \
    --cc=jonathanh@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=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=yamada.masahiro@socionext.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).