From: Lars-Peter Clausen Date: Mon, 15 Oct 2012 09:35:00 +0000 (+0100) Subject: iio: Add some helper macros for unit conversion X-Git-Tag: v3.7-rc3~13^2~20^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dbf8ccde1b810a59b684e1d1aec7f9d2d007162;p=pandora-kernel.git iio: Add some helper macros for unit conversion Some datasheets use a different unit to specify the channel scale than what IIO expects it to be. This patch adds two helper macros which allow to convert units commonly used in datasheets to IIO units: * acceleration: g -> meter / second**2 * angular velocity: degree (/ second) -> rad (/ second) This makes it much more convenient to specify and also easier to verify a channel's scale attribute. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed