lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 3/5] i2c: add support for HiSilicon I2C controller
From
Date
30.03.2021 17:19, Yicong Yang пишет:
...
> +struct hisi_i2c_controller {
> + struct i2c_adapter adapter;
> + void __iomem *iobase;
> + struct device *dev;
> + int irq;
> +
> + /* Intermediates for recording the transfer process */
> + struct completion *completion;
> + struct i2c_msg *msgs;
> + int msg_num;
> + int msg_tx_idx;
> + int buf_tx_idx;
> + int msg_rx_idx;
> + int buf_rx_idx;
> + u16 tar_addr;
> + u32 xfer_err;
> +
> + /* I2C bus configuration */
> + struct i2c_timings t;
> + u64 clk_rate_khz;

Looks like the u64 is overkill here and it doesn't allow you to use
COMPILE_TEST because 32bit arches can divide u64 only using the
do_div(), please fix this.

...
> +static const struct acpi_device_id hisi_i2c_acpi_ids[] = {
> + { "HISI03D1", 0 },
> + { }
> +};
> +MODULE_DEVICE_TABLE(acpi, hisi_i2c_acpi_ids);

> +MODULE_ALIAS("platform:hisi-i2c");


Nit: I think the MODULE_ALIAS shouldn't be necessary for this driver
since it will be matched by the ACPI table. You should be able to remove
it safely.

\
 
 \ /
  Last update: 2021-03-30 18:27    [W:0.136 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site