All of lore.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2013-07-27 15:31 Peter Meerwald
  2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio

Hello,

here's a patch series to clean up the hmc5843 magnetometer driver in
staging; the driver still has some extra attributes:

measurement configuration: used only for testing I think

operating mode: single vs. continuous conversion, also allows idle and sleep mode 
(which should not be exposed to user-mode I think); the data ready irq and buffered mode is not
implemented; the driver/chip runs in continues conversion mode by default

in_magn_range: some kind of gain, could probably use HARDWAREGAIN?

sampling_frequency: well-known, OK              
sampling frequency_available, well-known, OK

otherwise, look clean to me...

regards, p.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code
  2013-07-27 15:31 Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:01   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore Peter Meerwald
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

I2C is generally not probed for devices

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 33 ------------------------------
 1 file changed, 33 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 86c6bf9..e5999d4 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -53,14 +53,6 @@ enum hmc5843_ids {
 };
 
 /*
- * Beware: identification of the HMC5883 is still "H43";
- * I2C address is also unchanged
- */
-#define HMC5843_ID_REG_LENGTH			0x03
-#define HMC5843_ID_STRING			"H43"
-#define HMC5843_I2C_ADDRESS			0x1E
-
-/*
  * Range gain settings in (+-)Ga
  * Beware: HMC5843 and HMC5883 have different recommended sensor field
  * ranges; default corresponds to +-1.0 Ga and +-1.3 Ga, respectively
@@ -185,10 +177,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = {
 	"0.75", "1.5", "3", "7.5", "15", "30", "75",
 };
 
-/* Addresses to scan: 0x1E */
-static const unsigned short normal_i2c[] = { HMC5843_I2C_ADDRESS,
-					     I2C_CLIENT_END };
-
 /* Describe chip variants */
 struct hmc5843_chip_info {
 	const struct iio_chan_spec *channels;
@@ -621,25 +609,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
 	},
 };
 
-static int hmc5843_detect(struct i2c_client *client,
-			  struct i2c_board_info *info)
-{
-	unsigned char id_str[HMC5843_ID_REG_LENGTH];
-
-	if (client->addr != HMC5843_I2C_ADDRESS)
-		return -ENODEV;
-
-	if (i2c_smbus_read_i2c_block_data(client, HMC5843_ID_REG_A,
-				HMC5843_ID_REG_LENGTH, id_str)
-			!= HMC5843_ID_REG_LENGTH)
-		return -ENODEV;
-
-	if (0 != strncmp(id_str, HMC5843_ID_STRING, HMC5843_ID_REG_LENGTH))
-		return -ENODEV;
-
-	return 0;
-}
-
 /* Called when we have found a new HMC58X3 */
 static void hmc5843_init_client(struct i2c_client *client,
 				const struct i2c_device_id *id)
@@ -756,8 +725,6 @@ static struct i2c_driver hmc5843_driver = {
 	.id_table	= hmc5843_id,
 	.probe		= hmc5843_probe,
 	.remove		= hmc5843_remove,
-	.detect		= hmc5843_detect,
-	.address_list	= normal_i2c,
 };
 module_i2c_driver(hmc5843_driver);
 
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore
  2013-07-27 15:31 Peter Meerwald
  2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:02   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function Peter Meerwald
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index e5999d4..c281342 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -42,9 +42,6 @@
 #define HMC5883_DATA_OUT_Y_MSB_REG		0x07
 #define HMC5883_DATA_OUT_Y_LSB_REG		0x08
 #define HMC5843_STATUS_REG			0x09
-#define HMC5843_ID_REG_A			0x0A
-#define HMC5843_ID_REG_B			0x0B
-#define HMC5843_ID_REG_C			0x0C
 
 enum hmc5843_ids {
 	HMC5843_ID,
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function
  2013-07-27 15:31 Peter Meerwald
  2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
  2013-07-27 15:31 ` [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:03   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address Peter Meerwald
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

avoid polling data ready bit forever; msleep() may be too long
for high sampling frequencies but the driver interface does not
support buffering

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index c281342..79117ad 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -26,6 +26,7 @@
 #include <linux/types.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
+#include <linux/delay.h>
 
 #define HMC5843_CONFIG_REG_A			0x00
 #define HMC5843_CONFIG_REG_B			0x01
@@ -210,11 +211,22 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
 	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
 	struct hmc5843_data *data = iio_priv(indio_dev);
 	s32 result;
+	int tries = 150;
 
 	mutex_lock(&data->lock);
-	result = i2c_smbus_read_byte_data(client, HMC5843_STATUS_REG);
-	while (!(result & HMC5843_DATA_READY))
-		result = i2c_smbus_read_byte_data(client, HMC5843_STATUS_REG);
+	while (tries-- > 0) {
+		result = i2c_smbus_read_byte_data(client,
+			HMC5843_STATUS_REG);
+		if (result & HMC5843_DATA_READY)
+			break;
+		msleep(20);
+	}
+
+	if (tries < 0) {
+		dev_err(&client->dev, "data not ready\n");
+		mutex_unlock(&data->lock);
+		return -EIO;
+	}
 
 	result = i2c_smbus_read_word_data(client, address);
 	mutex_unlock(&data->lock);
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address
  2013-07-27 15:31 Peter Meerwald
                   ` (2 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:04   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately Peter Meerwald
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 79117ad..465dc2a 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -556,14 +556,14 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
 	return -EINVAL;
 }
 
-#define HMC5843_CHANNEL(axis, add)					\
+#define HMC5843_CHANNEL(axis, addr)					\
 	{								\
 		.type = IIO_MAGN,					\
 		.modified = 1,						\
 		.channel2 = IIO_MOD_##axis,				\
 		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
 		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),	\
-		.address = add						\
+		.address = addr						\
 	}
 
 static const struct iio_chan_spec hmc5843_channels[] = {
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately
  2013-07-27 15:31 Peter Meerwald
                   ` (3 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:10   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 465dc2a..042467d 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -178,7 +178,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = {
 /* Describe chip variants */
 struct hmc5843_chip_info {
 	const struct iio_chan_spec *channels;
-	int num_channels;
 	const char * const *regval_to_sample_freq;
 	const int *regval_to_input_field_mga;
 	const int *regval_to_nanoscale;
@@ -594,7 +593,6 @@ static const struct attribute_group hmc5843_group = {
 static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
 	[HMC5843_ID] = {
 		.channels = hmc5843_channels,
-		.num_channels = ARRAY_SIZE(hmc5843_channels),
 		.regval_to_sample_freq = hmc5843_regval_to_sample_freq,
 		.regval_to_input_field_mga =
 			hmc5843_regval_to_input_field_mga,
@@ -602,7 +600,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
 	},
 	[HMC5883_ID] = {
 		.channels = hmc5883_channels,
-		.num_channels = ARRAY_SIZE(hmc5883_channels),
 		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
 		.regval_to_input_field_mga =
 			hmc5883_regval_to_input_field_mga,
@@ -610,7 +607,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
 	},
 	[HMC5883L_ID] = {
 		.channels = hmc5883_channels,
-		.num_channels = ARRAY_SIZE(hmc5883_channels),
 		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
 		.regval_to_input_field_mga =
 			hmc5883l_regval_to_input_field_mga,
@@ -627,7 +623,7 @@ static void hmc5843_init_client(struct i2c_client *client,
 
 	data->variant = &hmc5843_chip_info_tbl[id->driver_data];
 	indio_dev->channels = data->variant->channels;
-	indio_dev->num_channels = data->variant->num_channels;
+	indio_dev->num_channels = 3;
 	hmc5843_set_meas_conf(client, data->meas_conf);
 	hmc5843_set_rate(client, data->rate);
 	hmc5843_configure(client, data->operating_mode);
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq
  2013-07-27 15:31 Peter Meerwald
                   ` (4 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-07-27 18:01   ` Jonathan Cameron
  2013-08-04 10:13   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy Peter Meerwald
                   ` (2 subsequent siblings)
  8 siblings, 2 replies; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 38 ++++++++++++++----------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 042467d..1ebb8f8 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -371,15 +371,13 @@ exit:
 	return count;
 }
 
-static IIO_DEVICE_ATTR(meas_conf,
-			S_IWUSR | S_IRUGO,
-			hmc5843_show_measurement_configuration,
-			hmc5843_set_measurement_configuration,
-			0);
+static IIO_DEVICE_ATTR(measurement_configuration, S_IWUSR | S_IRUGO,
+			hmc5843_show_measurement_conf,
+			hmc5843_set_measurement_conf, 0);
 
-static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
-						struct device_attribute *attr,
-						char *buf)
+static ssize_t hmc5843_show_sampling_freq_available(struct device *dev,
+					struct device_attribute *attr,
+					char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct hmc5843_data *data = iio_priv(indio_dev);
@@ -387,7 +385,8 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
 	int i;
 
 	for (i = 0; i < HMC5843_RATE_NOT_USED; i++) {
-		ssize_t n = sprintf(buf, "%s ", data->variant->regval_to_sample_freq[i]);
+		ssize_t n = sprintf(buf, "%s ",
+			data->variant->regval_to_sample_freq[i]);
 		buf += n;
 		total_n += n;
 	}
@@ -397,7 +396,7 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
 	return total_n;
 }
 
-static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_frequencies_available);
+static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_freq_available);
 
 static s32 hmc5843_set_rate(struct i2c_client *client,
 				u8 rate)
@@ -416,7 +415,7 @@ static s32 hmc5843_set_rate(struct i2c_client *client,
 	return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
 }
 
-static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
+static int hmc5843_check_sampling_freq(struct hmc5843_data *data,
 						const char *buf)
 {
 	const char * const *samp_freq = data->variant->regval_to_sample_freq;
@@ -430,7 +429,7 @@ static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
 	return -EINVAL;
 }
 
-static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
+static ssize_t hmc5843_set_sampling_freq(struct device *dev,
 					struct device_attribute *attr,
 					const char *buf, size_t count)
 {
@@ -440,7 +439,7 @@ static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
 	struct hmc5843_data *data = iio_priv(indio_dev);
 	int rate;
 
-	rate = hmc5843_check_sampling_frequency(data, buf);
+	rate = hmc5843_check_sampling_freq(data, buf);
 	if (rate < 0) {
 		dev_err(&client->dev,
 			"sampling frequency is not supported\n");
@@ -460,7 +459,7 @@ exit:
 	return count;
 }
 
-static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
+static ssize_t hmc5843_show_sampling_freq(struct device *dev,
 			struct device_attribute *attr, char *buf)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
@@ -476,10 +475,9 @@ static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
 	return sprintf(buf, "%s\n", data->variant->regval_to_sample_freq[rate]);
 }
 
-static IIO_DEVICE_ATTR(sampling_frequency,
-			S_IWUSR | S_IRUGO,
-			hmc5843_show_sampling_frequency,
-			hmc5843_set_sampling_frequency,
+static IIO_DEVICE_ATTR(sampling_freq, S_IWUSR | S_IRUGO,
+			hmc5843_show_sampling_freq,
+			hmc5843_set_sampling_freq,
 			HMC5843_CONFIG_REG_A);
 
 static ssize_t hmc5843_show_range_gain(struct device *dev,
@@ -578,9 +576,9 @@ static const struct iio_chan_spec hmc5883_channels[] = {
 };
 
 static struct attribute *hmc5843_attributes[] = {
-	&iio_dev_attr_meas_conf.dev_attr.attr,
+	&iio_dev_attr_measurement_configuration.dev_attr.attr,
 	&iio_dev_attr_operating_mode.dev_attr.attr,
-	&iio_dev_attr_sampling_frequency.dev_attr.attr,
+	&iio_dev_attr_sampling_freq.dev_attr.attr,
 	&iio_dev_attr_in_magn_range.dev_attr.attr,
 	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
 	NULL
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy
  2013-07-27 15:31 Peter Meerwald
                   ` (5 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:15   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes Peter Meerwald
  2013-07-27 15:31 ` [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Peter Meerwald
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald, Shubhrajyoti Datta

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 38 ++++++++++++------------------
 1 file changed, 15 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 1ebb8f8..52d6340 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -194,18 +194,15 @@ struct hmc5843_data {
 };
 
 /* The lower two bits contain the current conversion mode */
-static s32 hmc5843_configure(struct i2c_client *client,
-				       u8 operating_mode)
+static s32 hmc5843_configure(struct i2c_client *client, u8 operating_mode)
 {
-	return i2c_smbus_write_byte_data(client,
-					HMC5843_MODE_REG,
+	return i2c_smbus_write_byte_data(client, HMC5843_MODE_REG,
 					operating_mode & HMC5843_MODE_MASK);
 }
 
 /* Return the measurement value from the specified channel */
 static int hmc5843_read_measurement(struct iio_dev *indio_dev,
-				    int address,
-				    int *val)
+				    int address, int *val)
 {
 	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
 	struct hmc5843_data *data = iio_priv(indio_dev);
@@ -321,8 +318,7 @@ static IIO_DEVICE_ATTR(operating_mode,
  *     and BN.
  *
  */
-static s32 hmc5843_set_meas_conf(struct i2c_client *client,
-				      u8 meas_conf)
+static s32 hmc5843_set_meas_conf(struct i2c_client *client, u8 meas_conf)
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(client);
 	struct hmc5843_data *data = iio_priv(indio_dev);
@@ -332,7 +328,7 @@ static s32 hmc5843_set_meas_conf(struct i2c_client *client,
 	return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
 }
 
-static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
+static ssize_t hmc5843_show_measurement_conf(struct device *dev,
 						struct device_attribute *attr,
 						char *buf)
 {
@@ -341,10 +337,9 @@ static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
 	return sprintf(buf, "%d\n", data->meas_conf);
 }
 
-static ssize_t hmc5843_set_measurement_configuration(struct device *dev,
+static ssize_t hmc5843_set_measurement_conf(struct device *dev,
 						struct device_attribute *attr,
-						const char *buf,
-						size_t count)
+						const char *buf, size_t count)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
@@ -398,8 +393,7 @@ static ssize_t hmc5843_show_sampling_freq_available(struct device *dev,
 
 static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_freq_available);
 
-static s32 hmc5843_set_rate(struct i2c_client *client,
-				u8 rate)
+static s32 hmc5843_set_rate(struct i2c_client *client, u8 rate)
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(client);
 	struct hmc5843_data *data = iio_priv(indio_dev);
@@ -475,9 +469,8 @@ static ssize_t hmc5843_show_sampling_freq(struct device *dev,
 	return sprintf(buf, "%s\n", data->variant->regval_to_sample_freq[rate]);
 }
 
-static IIO_DEVICE_ATTR(sampling_freq, S_IWUSR | S_IRUGO,
-			hmc5843_show_sampling_freq,
-			hmc5843_set_sampling_freq,
+static IIO_DEVICE_ATTR(sampling_frequency, S_IWUSR | S_IRUGO,
+			hmc5843_show_sampling_freq, hmc5843_set_sampling_freq,
 			HMC5843_CONFIG_REG_A);
 
 static ssize_t hmc5843_show_range_gain(struct device *dev,
@@ -489,7 +482,8 @@ static ssize_t hmc5843_show_range_gain(struct device *dev,
 	struct hmc5843_data *data = iio_priv(indio_dev);
 
 	range = data->range;
-	return sprintf(buf, "%d\n", data->variant->regval_to_input_field_mga[range]);
+	return sprintf(buf, "%d\n",
+		data->variant->regval_to_input_field_mga[range]);
 }
 
 static ssize_t hmc5843_set_range_gain(struct device *dev,
@@ -527,10 +521,8 @@ exit:
 	return count;
 }
 
-static IIO_DEVICE_ATTR(in_magn_range,
-			S_IWUSR | S_IRUGO,
-			hmc5843_show_range_gain,
-			hmc5843_set_range_gain,
+static IIO_DEVICE_ATTR(in_magn_range, S_IWUSR | S_IRUGO,
+			hmc5843_show_range_gain, hmc5843_set_range_gain,
 			HMC5843_CONFIG_REG_B);
 
 static int hmc5843_read_raw(struct iio_dev *indio_dev,
@@ -578,7 +570,7 @@ static const struct iio_chan_spec hmc5883_channels[] = {
 static struct attribute *hmc5843_attributes[] = {
 	&iio_dev_attr_measurement_configuration.dev_attr.attr,
 	&iio_dev_attr_operating_mode.dev_attr.attr,
-	&iio_dev_attr_sampling_freq.dev_attr.attr,
+	&iio_dev_attr_sampling_frequency.dev_attr.attr,
 	&iio_dev_attr_in_magn_range.dev_attr.attr,
 	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
 	NULL
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes
  2013-07-27 15:31 Peter Meerwald
                   ` (6 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:22   ` Jonathan Cameron
  2013-07-27 15:31 ` [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Peter Meerwald
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 52d6340..0b24d7e 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -20,10 +20,7 @@
 */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
-#include <linux/slab.h>
-#include <linux/types.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/delay.h>
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
  2013-07-27 15:31 Peter Meerwald
                   ` (7 preceding siblings ...)
  2013-07-27 15:31 ` [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes Peter Meerwald
@ 2013-07-27 15:31 ` Peter Meerwald
  2013-08-04 10:23   ` Jonathan Cameron
  8 siblings, 1 reply; 20+ messages in thread
From: Peter Meerwald @ 2013-07-27 15:31 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 0b24d7e..70541aa 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -221,12 +221,12 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
 		return -EIO;
 	}
 
-	result = i2c_smbus_read_word_data(client, address);
+	result = i2c_smbus_read_word_swapped(client, address);
 	mutex_unlock(&data->lock);
 	if (result < 0)
 		return -EINVAL;
 
-	*val = (s16)swab16((u16)result);
+	*val = result;
 	return IIO_VAL_INT;
 }
 
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq
  2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
@ 2013-07-27 18:01   ` Jonathan Cameron
  2013-08-04 10:13   ` Jonathan Cameron
  1 sibling, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-07-27 18:01 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>

Glad to see this driver getting tidied up but I have a couple of questions about
the purpose of some of these attributes.

As you have observed elsewhere the device only supports the sysfs
interface at the moment, so do we actually want the various
modes?  My quick reading of the datasheet suggests that we may
just want to do transitions from sleep to single sampling mode
on demand (i.e. when a reading is requested).  Honestly I find
the differences between sleep and idle in the datasheet really
confusing.


Also is there a use (other than the self test) for the the generated
bias options under measurement_configuration?



> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 38 ++++++++++++++----------------
>  1 file changed, 18 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 042467d..1ebb8f8 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -371,15 +371,13 @@ exit:
>  	return count;
>  }
>  
> -static IIO_DEVICE_ATTR(meas_conf,
> -			S_IWUSR | S_IRUGO,
> -			hmc5843_show_measurement_configuration,
> -			hmc5843_set_measurement_configuration,
> -			0);
> +static IIO_DEVICE_ATTR(measurement_configuration, S_IWUSR | S_IRUGO,
> +			hmc5843_show_measurement_conf,
> +			hmc5843_set_measurement_conf, 0);
>  
> -static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
> -						struct device_attribute *attr,
> -						char *buf)
> +static ssize_t hmc5843_show_sampling_freq_available(struct device *dev,
> +					struct device_attribute *attr,
> +					char *buf)
>  {
>  	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> @@ -387,7 +385,8 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
>  	int i;
>  
>  	for (i = 0; i < HMC5843_RATE_NOT_USED; i++) {
> -		ssize_t n = sprintf(buf, "%s ", data->variant->regval_to_sample_freq[i]);
> +		ssize_t n = sprintf(buf, "%s ",
> +			data->variant->regval_to_sample_freq[i]);
>  		buf += n;
>  		total_n += n;
>  	}
> @@ -397,7 +396,7 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
>  	return total_n;
>  }
>  
> -static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_frequencies_available);
> +static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_freq_available);
>  
>  static s32 hmc5843_set_rate(struct i2c_client *client,
>  				u8 rate)
> @@ -416,7 +415,7 @@ static s32 hmc5843_set_rate(struct i2c_client *client,
>  	return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
>  }
>  
> -static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
> +static int hmc5843_check_sampling_freq(struct hmc5843_data *data,
>  						const char *buf)
>  {
>  	const char * const *samp_freq = data->variant->regval_to_sample_freq;
> @@ -430,7 +429,7 @@ static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
>  	return -EINVAL;
>  }
>  
> -static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
> +static ssize_t hmc5843_set_sampling_freq(struct device *dev,
>  					struct device_attribute *attr,
>  					const char *buf, size_t count)
>  {
> @@ -440,7 +439,7 @@ static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
>  	struct hmc5843_data *data = iio_priv(indio_dev);
>  	int rate;
>  
> -	rate = hmc5843_check_sampling_frequency(data, buf);
> +	rate = hmc5843_check_sampling_freq(data, buf);
>  	if (rate < 0) {
>  		dev_err(&client->dev,
>  			"sampling frequency is not supported\n");
> @@ -460,7 +459,7 @@ exit:
>  	return count;
>  }
>  
> -static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
> +static ssize_t hmc5843_show_sampling_freq(struct device *dev,
>  			struct device_attribute *attr, char *buf)
>  {
>  	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> @@ -476,10 +475,9 @@ static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
>  	return sprintf(buf, "%s\n", data->variant->regval_to_sample_freq[rate]);
>  }
>  
> -static IIO_DEVICE_ATTR(sampling_frequency,
> -			S_IWUSR | S_IRUGO,
> -			hmc5843_show_sampling_frequency,
> -			hmc5843_set_sampling_frequency,
> +static IIO_DEVICE_ATTR(sampling_freq, S_IWUSR | S_IRUGO,
> +			hmc5843_show_sampling_freq,
> +			hmc5843_set_sampling_freq,
>  			HMC5843_CONFIG_REG_A);
>  
>  static ssize_t hmc5843_show_range_gain(struct device *dev,
> @@ -578,9 +576,9 @@ static const struct iio_chan_spec hmc5883_channels[] = {
>  };
>  
>  static struct attribute *hmc5843_attributes[] = {
> -	&iio_dev_attr_meas_conf.dev_attr.attr,
> +	&iio_dev_attr_measurement_configuration.dev_attr.attr,
>  	&iio_dev_attr_operating_mode.dev_attr.attr,
> -	&iio_dev_attr_sampling_frequency.dev_attr.attr,
> +	&iio_dev_attr_sampling_freq.dev_attr.attr,
>  	&iio_dev_attr_in_magn_range.dev_attr.attr,
>  	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
>  	NULL
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code
  2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
@ 2013-08-04 10:01   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:01 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> I2C is generally not probed for devices
I wondered about this one for a while, as in some circumstances it is pretty
much the only option (hwmon drivers on random super i/o modules etc).

I'm a little worried someone might actually be using this functionality.
As the class is not specified, according to the i2c docs detection will only
function if the module is forced to load.  Also the function here does not,
as the docs specify it must, fill in the name field of the i2c_board_info structure.

Thus I'm going to drop it and see if anyone shouts about putting it back.

Chances are no one is using this and it is a legacy from this driver being
based on something in hwmon.

Jonathan
> 
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 33 ------------------------------
>  1 file changed, 33 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 86c6bf9..e5999d4 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -53,14 +53,6 @@ enum hmc5843_ids {
>  };
>  
>  /*
> - * Beware: identification of the HMC5883 is still "H43";
> - * I2C address is also unchanged
> - */
> -#define HMC5843_ID_REG_LENGTH			0x03
> -#define HMC5843_ID_STRING			"H43"
> -#define HMC5843_I2C_ADDRESS			0x1E
> -
> -/*
>   * Range gain settings in (+-)Ga
>   * Beware: HMC5843 and HMC5883 have different recommended sensor field
>   * ranges; default corresponds to +-1.0 Ga and +-1.3 Ga, respectively
> @@ -185,10 +177,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = {
>  	"0.75", "1.5", "3", "7.5", "15", "30", "75",
>  };
>  
> -/* Addresses to scan: 0x1E */
> -static const unsigned short normal_i2c[] = { HMC5843_I2C_ADDRESS,
> -					     I2C_CLIENT_END };
> -
>  /* Describe chip variants */
>  struct hmc5843_chip_info {
>  	const struct iio_chan_spec *channels;
> @@ -621,25 +609,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	},
>  };
>  
> -static int hmc5843_detect(struct i2c_client *client,
> -			  struct i2c_board_info *info)
> -{
> -	unsigned char id_str[HMC5843_ID_REG_LENGTH];
> -
> -	if (client->addr != HMC5843_I2C_ADDRESS)
> -		return -ENODEV;
> -
> -	if (i2c_smbus_read_i2c_block_data(client, HMC5843_ID_REG_A,
> -				HMC5843_ID_REG_LENGTH, id_str)
> -			!= HMC5843_ID_REG_LENGTH)
> -		return -ENODEV;
> -
> -	if (0 != strncmp(id_str, HMC5843_ID_STRING, HMC5843_ID_REG_LENGTH))
> -		return -ENODEV;
> -
> -	return 0;
> -}
> -
>  /* Called when we have found a new HMC58X3 */
>  static void hmc5843_init_client(struct i2c_client *client,
>  				const struct i2c_device_id *id)
> @@ -756,8 +725,6 @@ static struct i2c_driver hmc5843_driver = {
>  	.id_table	= hmc5843_id,
>  	.probe		= hmc5843_probe,
>  	.remove		= hmc5843_remove,
> -	.detect		= hmc5843_detect,
> -	.address_list	= normal_i2c,
>  };
>  module_i2c_driver(hmc5843_driver);
>  
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore
  2013-07-27 15:31 ` [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore Peter Meerwald
@ 2013-08-04 10:02   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:02 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 3 ---
>  1 file changed, 3 deletions(-)
Applied to the togreg branch of iio.git

Thanks,
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index e5999d4..c281342 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -42,9 +42,6 @@
>  #define HMC5883_DATA_OUT_Y_MSB_REG		0x07
>  #define HMC5883_DATA_OUT_Y_LSB_REG		0x08
>  #define HMC5843_STATUS_REG			0x09
> -#define HMC5843_ID_REG_A			0x0A
> -#define HMC5843_ID_REG_B			0x0B
> -#define HMC5843_ID_REG_C			0x0C
>  
>  enum hmc5843_ids {
>  	HMC5843_ID,
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function
  2013-07-27 15:31 ` [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function Peter Meerwald
@ 2013-08-04 10:03   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:03 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> avoid polling data ready bit forever; msleep() may be too long
> for high sampling frequencies but the driver interface does not
> support buffering
> 
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Applied to the togreg branch of iio.git.

Thanks
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index c281342..79117ad 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -26,6 +26,7 @@
>  #include <linux/types.h>
>  #include <linux/iio/iio.h>
>  #include <linux/iio/sysfs.h>
> +#include <linux/delay.h>
>  
>  #define HMC5843_CONFIG_REG_A			0x00
>  #define HMC5843_CONFIG_REG_B			0x01
> @@ -210,11 +211,22 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
>  	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
>  	s32 result;
> +	int tries = 150;
>  
>  	mutex_lock(&data->lock);
> -	result = i2c_smbus_read_byte_data(client, HMC5843_STATUS_REG);
> -	while (!(result & HMC5843_DATA_READY))
> -		result = i2c_smbus_read_byte_data(client, HMC5843_STATUS_REG);
> +	while (tries-- > 0) {
> +		result = i2c_smbus_read_byte_data(client,
> +			HMC5843_STATUS_REG);
> +		if (result & HMC5843_DATA_READY)
> +			break;
> +		msleep(20);
> +	}
> +
> +	if (tries < 0) {
> +		dev_err(&client->dev, "data not ready\n");
> +		mutex_unlock(&data->lock);
> +		return -EIO;
> +	}
>  
>  	result = i2c_smbus_read_word_data(client, address);
>  	mutex_unlock(&data->lock);
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address
  2013-07-27 15:31 ` [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address Peter Meerwald
@ 2013-08-04 10:04   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:04 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Confusing indeed.

Applied to the togreg branch of iio.git.

Thanks,
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 79117ad..465dc2a 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -556,14 +556,14 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
>  	return -EINVAL;
>  }
>  
> -#define HMC5843_CHANNEL(axis, add)					\
> +#define HMC5843_CHANNEL(axis, addr)					\
>  	{								\
>  		.type = IIO_MAGN,					\
>  		.modified = 1,						\
>  		.channel2 = IIO_MOD_##axis,				\
>  		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
>  		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),	\
> -		.address = add						\
> +		.address = addr						\
>  	}
>  
>  static const struct iio_chan_spec hmc5843_channels[] = {
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately
  2013-07-27 15:31 ` [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately Peter Meerwald
@ 2013-08-04 10:10   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:10 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
I was a little in two minds about whether the slight loss of clarity in dropping
this was worth the saving in code.  Personally I wouldn't have bothered making
the change, but as you have done it I'll take it ;)

Applied to the togreg branch of iio.git

Thanks,


> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 465dc2a..042467d 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -178,7 +178,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = {
>  /* Describe chip variants */
>  struct hmc5843_chip_info {
>  	const struct iio_chan_spec *channels;
> -	int num_channels;
>  	const char * const *regval_to_sample_freq;
>  	const int *regval_to_input_field_mga;
>  	const int *regval_to_nanoscale;
> @@ -594,7 +593,6 @@ static const struct attribute_group hmc5843_group = {
>  static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	[HMC5843_ID] = {
>  		.channels = hmc5843_channels,
> -		.num_channels = ARRAY_SIZE(hmc5843_channels),
>  		.regval_to_sample_freq = hmc5843_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5843_regval_to_input_field_mga,
> @@ -602,7 +600,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	},
>  	[HMC5883_ID] = {
>  		.channels = hmc5883_channels,
> -		.num_channels = ARRAY_SIZE(hmc5883_channels),
>  		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5883_regval_to_input_field_mga,
> @@ -610,7 +607,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	},
>  	[HMC5883L_ID] = {
>  		.channels = hmc5883_channels,
> -		.num_channels = ARRAY_SIZE(hmc5883_channels),
>  		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5883l_regval_to_input_field_mga,
> @@ -627,7 +623,7 @@ static void hmc5843_init_client(struct i2c_client *client,
>  
>  	data->variant = &hmc5843_chip_info_tbl[id->driver_data];
>  	indio_dev->channels = data->variant->channels;
> -	indio_dev->num_channels = data->variant->num_channels;
> +	indio_dev->num_channels = 3;
>  	hmc5843_set_meas_conf(client, data->meas_conf);
>  	hmc5843_set_rate(client, data->rate);
>  	hmc5843_configure(client, data->operating_mode);
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq
  2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
  2013-07-27 18:01   ` Jonathan Cameron
@ 2013-08-04 10:13   ` Jonathan Cameron
  1 sibling, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:13 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>

Hi Peter,

1) This patch does other things not mentioned in the description (such as renaming meas_conf
- a worthy change, but an unconnected one).

2) The ABI is very clear that the attribute itself must be called sampling_frequency not
sampling_freq.

Jonathan

> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 38 ++++++++++++++----------------
>  1 file changed, 18 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 042467d..1ebb8f8 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -371,15 +371,13 @@ exit:
>  	return count;
>  }
>  
> -static IIO_DEVICE_ATTR(meas_conf,
> -			S_IWUSR | S_IRUGO,
> -			hmc5843_show_measurement_configuration,
> -			hmc5843_set_measurement_configuration,
> -			0);
> +static IIO_DEVICE_ATTR(measurement_configuration, S_IWUSR | S_IRUGO,
> +			hmc5843_show_measurement_conf,
> +			hmc5843_set_measurement_conf, 0);
>  
> -static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
> -						struct device_attribute *attr,
> -						char *buf)
> +static ssize_t hmc5843_show_sampling_freq_available(struct device *dev,
> +					struct device_attribute *attr,
> +					char *buf)
>  {
>  	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> @@ -387,7 +385,8 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
>  	int i;
>  
>  	for (i = 0; i < HMC5843_RATE_NOT_USED; i++) {
> -		ssize_t n = sprintf(buf, "%s ", data->variant->regval_to_sample_freq[i]);
> +		ssize_t n = sprintf(buf, "%s ",
> +			data->variant->regval_to_sample_freq[i]);
>  		buf += n;
>  		total_n += n;
>  	}
> @@ -397,7 +396,7 @@ static ssize_t hmc5843_show_sampling_frequencies_available(struct device *dev,
>  	return total_n;
>  }
>  
> -static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_frequencies_available);
> +static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_freq_available);
>  
>  static s32 hmc5843_set_rate(struct i2c_client *client,
>  				u8 rate)
> @@ -416,7 +415,7 @@ static s32 hmc5843_set_rate(struct i2c_client *client,
>  	return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
>  }
>  
> -static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
> +static int hmc5843_check_sampling_freq(struct hmc5843_data *data,
>  						const char *buf)
>  {
>  	const char * const *samp_freq = data->variant->regval_to_sample_freq;
> @@ -430,7 +429,7 @@ static int hmc5843_check_sampling_frequency(struct hmc5843_data *data,
>  	return -EINVAL;
>  }
>  
> -static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
> +static ssize_t hmc5843_set_sampling_freq(struct device *dev,
>  					struct device_attribute *attr,
>  					const char *buf, size_t count)
>  {
> @@ -440,7 +439,7 @@ static ssize_t hmc5843_set_sampling_frequency(struct device *dev,
>  	struct hmc5843_data *data = iio_priv(indio_dev);
>  	int rate;
>  
> -	rate = hmc5843_check_sampling_frequency(data, buf);
> +	rate = hmc5843_check_sampling_freq(data, buf);
>  	if (rate < 0) {
>  		dev_err(&client->dev,
>  			"sampling frequency is not supported\n");
> @@ -460,7 +459,7 @@ exit:
>  	return count;
>  }
>  
> -static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
> +static ssize_t hmc5843_show_sampling_freq(struct device *dev,
>  			struct device_attribute *attr, char *buf)
>  {
>  	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> @@ -476,10 +475,9 @@ static ssize_t hmc5843_show_sampling_frequency(struct device *dev,
>  	return sprintf(buf, "%s\n", data->variant->regval_to_sample_freq[rate]);
>  }
>  
> -static IIO_DEVICE_ATTR(sampling_frequency,
> -			S_IWUSR | S_IRUGO,
> -			hmc5843_show_sampling_frequency,
> -			hmc5843_set_sampling_frequency,
> +static IIO_DEVICE_ATTR(sampling_freq, S_IWUSR | S_IRUGO,
> +			hmc5843_show_sampling_freq,
> +			hmc5843_set_sampling_freq,
>  			HMC5843_CONFIG_REG_A);
>  
>  static ssize_t hmc5843_show_range_gain(struct device *dev,
> @@ -578,9 +576,9 @@ static const struct iio_chan_spec hmc5883_channels[] = {
>  };
>  
>  static struct attribute *hmc5843_attributes[] = {
> -	&iio_dev_attr_meas_conf.dev_attr.attr,
> +	&iio_dev_attr_measurement_configuration.dev_attr.attr,
>  	&iio_dev_attr_operating_mode.dev_attr.attr,
> -	&iio_dev_attr_sampling_frequency.dev_attr.attr,
> +	&iio_dev_attr_sampling_freq.dev_attr.attr,
>  	&iio_dev_attr_in_magn_range.dev_attr.attr,
>  	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
>  	NULL
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy
  2013-07-27 15:31 ` [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy Peter Meerwald
@ 2013-08-04 10:15   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:15 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio, Shubhrajyoti Datta

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Err. Peter, this puts the sampling frequency attribute
back to its original full name (correctly) which I would
imagine was meant to be in the previous patch?

Jonathan
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 38 ++++++++++++------------------
>  1 file changed, 15 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 1ebb8f8..52d6340 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -194,18 +194,15 @@ struct hmc5843_data {
>  };
>  
>  /* The lower two bits contain the current conversion mode */
> -static s32 hmc5843_configure(struct i2c_client *client,
> -				       u8 operating_mode)
> +static s32 hmc5843_configure(struct i2c_client *client, u8 operating_mode)
>  {
> -	return i2c_smbus_write_byte_data(client,
> -					HMC5843_MODE_REG,
> +	return i2c_smbus_write_byte_data(client, HMC5843_MODE_REG,
>  					operating_mode & HMC5843_MODE_MASK);
>  }
>  
>  /* Return the measurement value from the specified channel */
>  static int hmc5843_read_measurement(struct iio_dev *indio_dev,
> -				    int address,
> -				    int *val)
> +				    int address, int *val)
>  {
>  	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> @@ -321,8 +318,7 @@ static IIO_DEVICE_ATTR(operating_mode,
>   *     and BN.
>   *
>   */
> -static s32 hmc5843_set_meas_conf(struct i2c_client *client,
> -				      u8 meas_conf)
> +static s32 hmc5843_set_meas_conf(struct i2c_client *client, u8 meas_conf)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(client);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> @@ -332,7 +328,7 @@ static s32 hmc5843_set_meas_conf(struct i2c_client *client,
>  	return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
>  }
>  
> -static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
> +static ssize_t hmc5843_show_measurement_conf(struct device *dev,
>  						struct device_attribute *attr,
>  						char *buf)
>  {
> @@ -341,10 +337,9 @@ static ssize_t hmc5843_show_measurement_configuration(struct device *dev,
>  	return sprintf(buf, "%d\n", data->meas_conf);
>  }
>  
> -static ssize_t hmc5843_set_measurement_configuration(struct device *dev,
> +static ssize_t hmc5843_set_measurement_conf(struct device *dev,
>  						struct device_attribute *attr,
> -						const char *buf,
> -						size_t count)
> +						const char *buf, size_t count)
>  {
>  	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
>  	struct i2c_client *client = to_i2c_client(indio_dev->dev.parent);
> @@ -398,8 +393,7 @@ static ssize_t hmc5843_show_sampling_freq_available(struct device *dev,
>  
>  static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hmc5843_show_sampling_freq_available);
>  
> -static s32 hmc5843_set_rate(struct i2c_client *client,
> -				u8 rate)
> +static s32 hmc5843_set_rate(struct i2c_client *client, u8 rate)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(client);
>  	struct hmc5843_data *data = iio_priv(indio_dev);
> @@ -475,9 +469,8 @@ static ssize_t hmc5843_show_sampling_freq(struct device *dev,
>  	return sprintf(buf, "%s\n", data->variant->regval_to_sample_freq[rate]);
>  }
>  
> -static IIO_DEVICE_ATTR(sampling_freq, S_IWUSR | S_IRUGO,
> -			hmc5843_show_sampling_freq,
> -			hmc5843_set_sampling_freq,
> +static IIO_DEVICE_ATTR(sampling_frequency, S_IWUSR | S_IRUGO,
> +			hmc5843_show_sampling_freq, hmc5843_set_sampling_freq,
>  			HMC5843_CONFIG_REG_A);
>  
>  static ssize_t hmc5843_show_range_gain(struct device *dev,
> @@ -489,7 +482,8 @@ static ssize_t hmc5843_show_range_gain(struct device *dev,
>  	struct hmc5843_data *data = iio_priv(indio_dev);
>  
>  	range = data->range;
> -	return sprintf(buf, "%d\n", data->variant->regval_to_input_field_mga[range]);
> +	return sprintf(buf, "%d\n",
> +		data->variant->regval_to_input_field_mga[range]);
>  }
>  
>  static ssize_t hmc5843_set_range_gain(struct device *dev,
> @@ -527,10 +521,8 @@ exit:
>  	return count;
>  }
>  
> -static IIO_DEVICE_ATTR(in_magn_range,
> -			S_IWUSR | S_IRUGO,
> -			hmc5843_show_range_gain,
> -			hmc5843_set_range_gain,
> +static IIO_DEVICE_ATTR(in_magn_range, S_IWUSR | S_IRUGO,
> +			hmc5843_show_range_gain, hmc5843_set_range_gain,
>  			HMC5843_CONFIG_REG_B);
>  
>  static int hmc5843_read_raw(struct iio_dev *indio_dev,
> @@ -578,7 +570,7 @@ static const struct iio_chan_spec hmc5883_channels[] = {
>  static struct attribute *hmc5843_attributes[] = {
>  	&iio_dev_attr_measurement_configuration.dev_attr.attr,
>  	&iio_dev_attr_operating_mode.dev_attr.attr,
> -	&iio_dev_attr_sampling_freq.dev_attr.attr,
> +	&iio_dev_attr_sampling_frequency.dev_attr.attr,
>  	&iio_dev_attr_in_magn_range.dev_attr.attr,
>  	&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
>  	NULL
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes
  2013-07-27 15:31 ` [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes Peter Meerwald
@ 2013-08-04 10:22   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:22 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the togreg branch of iio.git

I had my doubts about whether types.h should be included even
though it is obviously pulled in by lots of other headers.

The other two are fair enough as there are no direct uses of
kmalloc and friends or of init section markings.

> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 52d6340..0b24d7e 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -20,10 +20,7 @@
>  */
>  
>  #include <linux/module.h>
> -#include <linux/init.h>
>  #include <linux/i2c.h>
> -#include <linux/slab.h>
> -#include <linux/types.h>
>  #include <linux/iio/iio.h>
>  #include <linux/iio/sysfs.h>
>  #include <linux/delay.h>
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
  2013-07-27 15:31 ` [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Peter Meerwald
@ 2013-08-04 10:23   ` Jonathan Cameron
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Cameron @ 2013-08-04 10:23 UTC (permalink / raw)
  To: Peter Meerwald; +Cc: linux-iio

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the togreg branch of iio.git

Thanks,

So, all applied except for those two patches in the middle that seem
to have gotten rather scrambled up.

Jonathan
> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 0b24d7e..70541aa 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -221,12 +221,12 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
>  		return -EIO;
>  	}
>  
> -	result = i2c_smbus_read_word_data(client, address);
> +	result = i2c_smbus_read_word_swapped(client, address);
>  	mutex_unlock(&data->lock);
>  	if (result < 0)
>  		return -EINVAL;
>  
> -	*val = (s16)swab16((u16)result);
> +	*val = result;
>  	return IIO_VAL_INT;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-08-04  9:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-27 15:31 Peter Meerwald
2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
2013-08-04 10:01   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore Peter Meerwald
2013-08-04 10:02   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function Peter Meerwald
2013-08-04 10:03   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address Peter Meerwald
2013-08-04 10:04   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately Peter Meerwald
2013-08-04 10:10   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
2013-07-27 18:01   ` Jonathan Cameron
2013-08-04 10:13   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy Peter Meerwald
2013-08-04 10:15   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes Peter Meerwald
2013-08-04 10:22   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Peter Meerwald
2013-08-04 10:23   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.