lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdnwrxw96prr9hyLdZ2u6t1uNcj6pyxCp52UoVOpatTpg@mail.gmail.com>
Date: Mon, 6 May 2024 15:05:52 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andreas Kemnade <andreas@...nade.info>
Cc: dmitry.torokhov@...il.com, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, u.kleine-koenig@...gutronix.de, hdegoede@...hat.com, 
	siebren.vroegindeweij@...mail.com, linux-input@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] Input: ektf2127 - add ektf2232 support

On Mon, May 6, 2024 at 12:48 AM Andreas Kemnade <andreas@...nade.info> wrote:
>
> The chip is similar, but has status bits at different positions,
> so use the correct bits.

..

> @@ -46,6 +47,11 @@ struct ektf2127_ts {
>         struct input_dev *input;
>         struct gpio_desc *power_gpios;
>         struct touchscreen_properties prop;
> +       int status_shift;
> +};
> +
> +struct ektf2127_i2c_chip_data {
> +       int status_shift;
>  };
>
>  static void ektf2127_parse_coordinates(const u8 *buf, unsigned int touch_count,

I'm wondering if you are using --histogram diff algo when preparing the patches.

..

> +       chip_data = device_get_match_data(&client->dev);
> +       if (!chip_data)
> +               chip_data = (const struct ektf2127_i2c_chip_data *)id->driver_data;
> +       if (!chip_data) {
> +               dev_err(&client->dev, "missing chip data\n");
> +               return -EINVAL;

First of all, there is a special combined API for this, please use it
instead. Second, use dev_err_probe().

> +       }

..

>  #ifdef CONFIG_OF

Side note: Ideally we should kill this ugliness. But it can be done later on.


--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ