lkml.org 
[lkml]   [2023]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/5] iio: pressure: bmp280: Allow multiple chips id per family of devices
On Sun, Oct 22, 2023 at 07:22:20PM +0200, Angel Iglesias wrote:
> Improve device detection in certain chip families known to have various
> chip ids.
> When no known ids match, gives a warning but follows along what device
> said on the firmware and tries to configure it.

I would rephrase it a bit:

"Improve device detection in certain chip families known to have
various chip IDs. When no ID matches, give a warning but follow
along what device said on the firmware side and try to configure
it."

...

> + for (i = 0; i < data->chip_info->num_chip_id; i++) {
> + if (chip_id == data->chip_info->chip_id[i]) {
> + dev_info(dev, "0x%x is a known chip id for %s\n", chip_id, name);
> + break;
> + }

> + dev_warn(dev, "chip id 0x%x does not match known id 0x%x\n",
> + chip_id, data->chip_info->chip_id[i]);

If the matching ID is not the first one, user will have an unneeded warning here.

> }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-10-23 13:26    [W:0.120 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site