OSDN Git Service

iio-sensors: Refactor sensor_catalog definition
authorDaniel Baluta <daniel.baluta@intel.com>
Thu, 11 Dec 2014 13:57:32 +0000 (15:57 +0200)
committerGerrit Code Review <gerrit2@irsgerrit001.ir.intel.com>
Fri, 6 Feb 2015 10:15:19 +0000 (10:15 +0000)
commitc4b636db9bc583883760a63f43fccd60df9cfb1f
treee51c28af8e31898b20505d1e7638774fcfddbaea
parent69c468d5448e07e31e953dd7469b9e2b8eb41d3c
iio-sensors: Refactor sensor_catalog definition

Next patches will introduce event support to IIO sensor catalog.
Following the current approach that uses DECLARE_SENSOR_X for
a sensor with X channels, we will have to introduce a macro like
DECLARE_SENSOR_X_Y for a sensor with X channels, each channel having
Y events. But this isn't scalable!

So, instead of using macros for sensor catalog entries lets keep it
simple and use inline definition for each channel. The same will be
done for events.

Change-Id: I12ac7ba07a3115ae85f7ebab835a73fd738bace2
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
enumeration.c
enumeration.h