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
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot