From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] gpio: Add PCA9698 40-bit I2C I/O port
Date: Wed, 19 Oct 2011 10:41:50 -0400 [thread overview]
Message-ID: <201110191041.51396.vapier@gentoo.org> (raw)
In-Reply-To: <1319006040-25380-1-git-send-email-eibach@gdsys.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
prev parent reply other threads:[~2011-10-19 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 6:34 [U-Boot] [PATCH v2] gpio: Add PCA9698 40-bit I2C I/O port Dirk Eibach
2011-10-19 7:48 ` Stefan Roese
2011-10-19 8:37 ` Eibach, Dirk
2011-10-19 14:36 ` Mike Frysinger
2011-10-20 6:45 ` Stefan Roese
2011-10-19 14:41 ` Mike Frysinger [this message]
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=201110191041.51396.vapier@gentoo.org \
--to=vapier@gentoo.org \
--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.