From: Mike Frysinger Date: Wed, 19 Oct 2011 10:41:50 -0400 Subject: [U-Boot] [PATCH v2] gpio: Add PCA9698 40-bit I2C I/O port In-Reply-To: <1319006040-25380-1-git-send-email-eibach@gdsys.de> References: <1319006040-25380-1-git-send-email-eibach@gdsys.de> Message-ID: <201110191041.51396.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 19 October 2011 02:34:00 Dirk Eibach wrote: > --- /dev/null > +++ b/include/pca9698.h > > +#ifndef __PCA9698_H_ > +#define __PCA9698_H_ missing copyright/license/etc... comment block at top of file > +int pca9698_direction_input(u8 chip, unsigned offset); > +int pca9698_direction_output(u8 chip, unsigned offset); > +int pca9698_get_input(u8 chip, unsigned offset); > +int pca9698_set_output(u8 chip, unsigned offset, int value); what is "chip" ? an i2c addr ? and "offset" is some internal value indicating which pin to drive ? if so, better names might be "u8 addr" and "unsigned gpio". a single comment here would go a long way. in terms of conforming to existing API: - the direction_output() function needs to take a "value" - get_input() should be get_value() - set_output() should be set_value() - you should have a request() func to validate the GPIO - add a stub free() func -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111019/5bf55da6/attachment.pgp