From: Lars-Peter Clausen Date: Mon, 4 Jun 2012 09:36:11 +0000 (+0200) Subject: iio: Add helper functions for enum style channel attributes X-Git-Tag: v3.6-rc1~100^2~935 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5212cc8a9d833791a7aec566db136e78951f203d;p=pandora-kernel.git iio: Add helper functions for enum style channel attributes We often have the case were we do have a enum style channel attribute. These attributes have in common that they are a list of string values which usually map in a 1-to-1 fashion to integer values. This patch implements some common helper code for implementing enum style channel attributes using extended channel attributes. The helper functions take care of converting between the string and integer values, as well providing a function for "_available" attributes which list all available enum items. Signed-off-by: Lars-Peter Clausen Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed