From: Tom Rini <trini@konsulko.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: Tue, 10 Mar 2015 12:03:14 -0400 [thread overview]
Message-ID: <20150310160314.GA32541@bill-the-cat> (raw)
In-Reply-To: <1426000283-21818-2-git-send-email-vigneshr@ti.com>
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!
> +/* NOTE: these chips have strange "quasi-bidirectional" I/O pins.
/*
* NOTE: ...
> +cmd_tbl_t cmd_pcf8575[] = {
> + U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCF8575_CMD_DEVICE, "", ""),
> + U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCF8575_CMD_OUTPUT, "", ""),
> + U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCF8575_CMD_INPUT, "", ""),
> + U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCF8575_CMD_INFO, "", ""),
> +};
Why isn't that just done with the normal gpio command?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150310/cf256422/attachment.sig>
next prev parent reply other threads:[~2015-03-10 16:03 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 [this message]
2015-03-11 8:49 ` Vignesh R
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=20150310160314.GA32541@bill-the-cat \
--to=trini@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox