Re: [RFC PATCH v3 5/7] i2c: aspeed: switch to generic fw properties.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2023 at 1:08 PM Jonathan Cameron
<Jonathan.Cameron@xxxxxxxxxx> wrote:
>
> Moving over to generic firmware properties allows this driver to
> get closer to working out of the box with both device tree and
> other firmware options, such as ACPI via PRP0001.
>
> Tested only via QEMU emulation.

...

>  static int aspeed_i2c_probe_bus(struct platform_device *pdev)
>  {
> -       const struct of_device_id *match;

With

  struct device *dev = &pdev->dev;

...

> +       device_property_read_u32(&pdev->dev,
> +                                "bus-frequency", &bus->bus_frequency);

This can take one or both parameters on one line.

...

> +       bus->get_clk_reg_val =
> +               (aspeed_get_clk_reg_val_cb)device_get_match_data(&pdev->dev);

This one as well I believe.

Also others, but it can be done in a separate patch.

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux