On 01.07.2011 12:11, Jonathan Cameron wrote:
-static IIO_DEVICE_ATTR(magn_scale, - S_IRUGO, - show_scale, - NULL , 0); + +#define HMC5843_CHANNEL(axis, add) \ + { \ + .type = IIO_MAGN, \ + .modified = 1, \ + .channel2 = IIO_MOD_##axis, \ + .info_mask = (1<< IIO_CHAN_INFO_SCALE_SHARED), \ + .address = add \ + } + +static const struct iio_chan_spec hmc5843_channels[] = { + HMC5843_CHANNEL(X, HMC5843_DATA_OUT_X_MSB_REG), + HMC5843_CHANNEL(X, HMC5843_DATA_OUT_Y_MSB_REG), + HMC5843_CHANNEL(X, HMC5843_DATA_OUT_Z_MSB_REG), +};
Shouldn't be all X, I guess. Regards, -- Manuel Stahl Fraunhofer-Institut IIS Leistungsoptimierte Systeme Nordostpark 93 D90411 Nürnberg Telefon +49 (0)911/58061-6419 Fax +49 (0)911/58061-6398 E-Mail manuel.stahl@xxxxxxxxxxxxxxxxx http://www.iis.fraunhofer.de http://www.smart-power.fraunhofer.de -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html