]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit - include/linux/spi/tsc210x.h
tsc210x cleanup
authorDavid Brownell <david-b@pacbell.net>
Tue, 14 Aug 2007 05:38:13 +0000 (22:38 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 15 Aug 2007 10:51:32 +0000 (03:51 -0700)
commit35d23ec1c56c14800c07e8265c577e33365c7eff
treefbc83202d88020bff4dbbbe2547b1c4ed0747a93
parentd37654d323cc9b2b79ec948f9352ed0b629aa56a
tsc210x cleanup

This is mostly cleanup of the tsc210x patch, but some bugs were fixed so now
it works on tsc2101 too.  Also, a few issues are now noted in the code:

 Tool-reported:
  - Address checkpatch.pl issues in the original patch
  - And also "sparse" issues

 Previously wrong:
  - Cope with CONFIG_SOUND_MODULE
  - Register accessor routines will now return error codes
  - ... many callers now abort cleanly after errors
  - Don't depend on seeing only a rev #1 tsc2102 chip!
  - Add missing EXPORT_SYMBOL declarations

 Style issues:
  - BUG_ON() is strongly to be avoided
  - So are macros that capture variables
  - And needless casting from void pointers
  - And type punning
  - Use dev_*() for messaging where practical
  - Use u16 not uint16_t, etc
  - Various other whitespace issues
  - Avoid __FUNCTION__
  - Single-lines for file-top comments; no whole paths

 Object code size and Other cleanup:
  - Compile most strings out unless -DDEBUG is configured (saving space)
  - Move some code into exit sections (then it may well vanish, saving space)
  - Add some header comments

 Open issues:
  - Hwmon needs to know VREF and the chip type, and to scale its values
  - Upstream push should exclude audio until some version is working
  - Audio will needs to export symbols to modules, too
  - Lots of the I/O calls (especially audio) still don't handle errors
  - How could board init code get board-specific temp calibration data?

Also the Kconfig is more open-ended; tsc210x might in the future include the
tsc2100 and tsc2111, it doesn't need to be limited to tsc2101 and tsc2102.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/hwmon/Kconfig
drivers/hwmon/tsc210x_sensors.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/tsc210x_ts.c
drivers/spi/Kconfig
drivers/spi/tsc210x.c
include/linux/spi/tsc210x.h