Re: [NEW DRIVER V2 1/7] DA9058 MFD core and ADC driver

From: Mark Brown
Date: Mon Aug 06 2012 - 08:26:19 EST


On Sun, Aug 05, 2012 at 09:43:42PM +0100, Anthony Olech wrote:

> @@ -3,6 +3,7 @@
> #
>
> if HAS_IOMEM
> +
> menu "Multifunction device drivers"

Hrm?

> +static int da9058_automatic_adc_conversion(struct da9058 *da9058,
> + const int channel, int *value)
> +{

I see you've ignored my comments about using IIO.

> + /*
> + * the init_board_irq() call-back function should be defined in
> + * the machine driver initialization code and is used to set up
> + * the actual (probably GPIO) line as an interrupt line.
> + */
> + if (pdata->init_board_irq) {
> + ret = pdata->init_board_irq();
> + if (ret)
> + goto failed_to_setup_the_actual_i2c_hw_irq;
> + }

Why on earth do you need this? This should not be needed with modern
kernels, especially not for the documented purpose.

> + regmap = devm_regmap_init_i2c(i2c, &da9058_regmap_config);

Does the device support any other control interfaces?

You've also not defined the regmap config which means that this patch
will break the build. This suggests these patches haven't been
tested...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/