[PATCH v4 09/13] iio: adc: mt6370: Add Mediatek MT6370 support

Andy Shevchenko andy.shevchenko at gmail.com
Mon Jul 4 20:35:47 UTC 2022


On Mon, Jul 4, 2022 at 7:42 AM ChiaEn Wu <peterwu.pub at gmail.com> wrote:
>
> From: ChiaEn Wu <chiaen_wu at richtek.com>
>
> Add Mediatek MT6370 ADC support.

...

> +         This driver can also be built as a module. If so the module

If so,

> +         will be called "mt6370-adc.ko".

No ".ko" part.

...

> +#define ADC_CONV_TIME_US               35000

Since it's actually MS, drop this and use MS * 1000 whenever it's needed.


> +#define ADC_CONV_TIME_MS               (ADC_CONV_TIME_US / 1000)

...

> +static int mt6370_adc_read_label(struct iio_dev *iio_dev,
> +                                struct iio_chan_spec const *chan, char *label)
> +{
> +       return snprintf(label, PAGE_SIZE, "%s\n",
> +                       mt6370_channel_labels[chan->channel]);

sysfs_emit()

> +}

...

> +static int mt6370_adc_probe(struct platform_device *pdev)
> +{
> +       int ret;
> +       struct mt6370_adc_data *priv;
> +       struct regmap *regmap;
> +       struct iio_dev *indio_dev;

Per all your patches, use reversed xmas tree ordering ("longest line
first" rule).
Also it may be good to have a temporary variable for struct device pointer.

> +}

...

> +MODULE_DESCRIPTION("MT6370 ADC Drvier");

Driver. Spell check your patches.

-- 
With Best Regards,
Andy Shevchenko


More information about the dri-devel mailing list