All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot PATCH 1/3] gpio: pcf8575: Add pcf8575 driver to control gpio lines
Date: Wed, 11 Mar 2015 14:19:32 +0530	[thread overview]
Message-ID: <5500019C.3080505@ti.com> (raw)
In-Reply-To: <20150310160314.GA32541@bill-the-cat>



On Tuesday 10 March 2015 09:33 PM, Tom Rini wrote:
> On Tue, Mar 10, 2015 at 08:41:21PM +0530, Vignesh R wrote:
> 
>> TI's pcf8575 is a 16-bit I2C based GPIO expander.The device features a
>> 16-bit quasi-bidirectional I/O ports. Each quasi-bidirectional I/O can
>> be used as an input or output without the use of a data-direction
>> control signal. The I/Os should be high before being used as inputs.
>>
>> This driver is based on pcf857x driver available in Linux 4.0 kernel.
>> It supports basic reading and writing of gpio pins.
> 
> For attribution of stuff ported from the kernel please see
> http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
> 
> [snip]
>> diff --git a/drivers/gpio/pcf8575.c b/drivers/gpio/pcf8575.c
>> new file mode 100644
>> index 000000000000..1ee92a29760a
>> --- /dev/null
>> +++ b/drivers/gpio/pcf8575.c
>> @@ -0,0 +1,248 @@
>> +/*
>> + * PCF8575 I2C GPIO EXPANDER DRIVER
>> + *
>> + * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License as
>> + * published by the Free Software Foundation version 2.
>> + *
>> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
>> + * kind, whether express or implied; without even the implied warranty
>> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + */
> 
> Please use SPDX tags for new files, thanks.
> 
> And right up front, this driver isn't using device model, please re-work
> and update to use that framework, thanks!

Thanks for reviewing.

I can switch to device model, but DRA72 does not support device tree and
hence I will not be able use device model based pcf driver in my use-case.

One approach is that, I will re-write driver to support both deprecated
gpio APIs (like gpio_get_value) and gpio device model APIs
(dm_gpio_ops). Is this approach okay? But, somebody will have to test
the dm_gpio_ops implementations as DRA72 does not support DT.

Regards
Vignesh

  reply	other threads:[~2015-03-11  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 15:11 [U-Boot] [U-Boot PATCH 0/3] Add support for pcf8575 Vignesh R
2015-03-10 15:11 ` [U-Boot] [U-Boot PATCH 1/3] gpio: pcf8575: Add pcf8575 driver to control gpio lines Vignesh R
2015-03-10 16:03   ` Tom Rini
2015-03-11  8:49     ` Vignesh R [this message]
2015-03-11 13:41       ` Tom Rini
2015-03-10 15:11 ` [U-Boot] [U-Boot PATCH 2/3] ARM: dra7xx_evm: Enable pcf driver Vignesh R
2015-03-10 16:03   ` Tom Rini
2015-03-10 15:11 ` [U-Boot] [U-Boot PATCH 3/3] ARM: DRA7-EVM: switch cpsw to use slave0 Vignesh R
2015-03-10 16:03   ` Tom Rini

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=5500019C.3080505@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.