public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Aaron Sierra <asierra@xes-inc.com>
Cc: "Agócs Pál" <agocs.pal.86@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>
Subject: Re: [PATCH v2] lpc_ich: fix gpio base and control offsets
Date: Tue, 22 Jan 2013 04:27:08 +0100	[thread overview]
Message-ID: <20130122032708.GO7409@sortiz-mobl> (raw)
In-Reply-To: <63f2f7f3-fd03-433e-8990-d60d38954e7b@zimbra>

Hi Aaron,

On Tue, Jan 15, 2013 at 02:42:45PM -0600, Aaron Sierra wrote:
> In ICH5 and earlier the GPIOBASE and GPIOCTRL registers are found at
> offsets 0x58 and 0x5C, respectively. This patch allows GPIO access to
> properly be enabled (and disabled) for these chipsets.
> 
> Signed-off-by: Agócs Pál <agocs.pal.86@gmail.com>
> Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
> ---
>  drivers/mfd/lpc_ich.c |   40 ++++++++++++++++++++++------------------
>  1 file changed, 22 insertions(+), 18 deletions(-)
I'm fine with the gpio base and offset fixes, but the
s/id->driver_data/lpc_ich_chipset/ changes are not very nice.
It's probably time to introduce an lpc_ich_prv struct that would contain the
device id and also the 2 acpi_save and gpio_save static variable. You allocate
it in your probe routine and hook it to your pci_dev pointer through
pci_set_drvdata().
pci_get_drvdata() will help you fetch that structure back from your pci_dev
pointer. The driver will overall look cleaner this way.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      parent reply	other threads:[~2013-01-22  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <88cea640-8f88-4fd4-9cb0-77ed482d7e19@zimbra>
2013-01-15 20:42 ` [PATCH v2] lpc_ich: fix gpio base and control offsets Aaron Sierra
2013-01-17 13:40   ` Linus Walleij
2013-01-22  3:27   ` Samuel Ortiz [this message]

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=20130122032708.GO7409@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=agocs.pal.86@gmail.com \
    --cc=asierra@xes-inc.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.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