From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Tue, 18 Nov 2008 15:51:15 -0600 Subject: [U-Boot] [PATCH 1/3] Add support for PCA953x I2C gpio devices In-Reply-To: <20081118213322.E5003832E89D@gemini.denx.de> References: <1224800639-31350-1-git-send-email-ptyser@xes-inc.com> <1224800639-31350-2-git-send-email-ptyser@xes-inc.com> <20081118213322.E5003832E89D@gemini.denx.de> Message-ID: <1227045075.3065.25.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Tue, 2008-11-18 at 22:33 +0100, Wolfgang Denk wrote: > Dear Peter Tyser, > > In message <1224800639-31350-2-git-send-email-ptyser@xes-inc.com> you wrote: > > Initial support for NXP's 4 and 8 bit I2C gpio expanders > > (eg pca9537, pca9557, etc). The CONFIG_PCA953X define > > enables support for the devices while the CONFIG_CMD_PCA953X > > define enables the pca953x command. > > I'm not sure if we need such a detailed level of access to these > chips. We already have a couple of similar I/O expanders in some > boards, for example implemente in some PICs. See for example the "pic > read" / "pic write" conde in board/lwmon/lwmon.c etc. > > I think we should generalize this - and more than read / write isn't > really needed, or is it? What do you mean by "we should generalize this"? I view the read/write/invert commands as necessary to easily configure/read/write the GPIO pins, and the info command is nice, but not necessary. The info command is nice to get an idea of what's going on at a high level - eg is the input on pin 2 being inverted? What pins are currently being driven low? etc. I've found the iopinfo command useful for the 82xx boards and tried to replicate similar functionality in this driver. I like the info command but understand if others want it removed. Let me know if you'd like me to change it. Thanks, Peter