lkml.org 
[lkml]   [2021]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 10/11] platform/x86: int3472: Pass tps68470_regulator_platform_data to the tps68470-regulator MFD-cell
On Tue, Nov 2, 2021 at 11:50 AM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Pass tps68470_regulator_platform_data to the tps68470-regulator
> MFD-cell, specifying the voltages of the various regulators and
> tying the regulators to the sensor supplies so that sensors which use
> the TPS68470 can find their regulators.
>
> Since the voltages and supply connections are board-specific, this
> introduces a DMI matches int3472_tps68470_board_data struct which
> contains the necessary per-board info.
>
> This per-board info also includes GPIO lookup information for the
> sensor IO lines which may be connected to the tps68470 GPIOs.

...

> + board_data = int3472_tps68470_get_board_data(dev_name(&client->dev));
> + if (!board_data) {
> + dev_err(&client->dev, "No board-data found for this laptop/tablet model\n");
> + return -ENODEV;

It's fine to use dev_err_probe() for known error codes.

> + }

...

> + cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;

Do we need casting?

...

> +#include <linux/dmi.h>
> +#include <linux/gpio/machine.h>
> +#include <linux/platform_data/tps68470.h>
> +#include <linux/regulator/machine.h>

string.h for strcmp() ?
kernel.h for ARRAY_SIZE() ?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-11-02 15:36    [W:0.265 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site