From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFC6233439D for ; Thu, 30 Oct 2025 07:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761810678; cv=none; b=EYdzMi5Ti8kG9aYNCIKhCQ9edjDfrsPB+cThh2Igbj7h0KciazxIB2i84e2zRrT2Twj4UAwJNQYb7ajQcHeiX5f8iUcUTtnq+xO84zTeCgi8gCgPGH0p0rGcGPQ7dn8oZKerB2YTV11kWsCl/OVuZsvUKW99ztppOdZcELZCsAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761810678; c=relaxed/simple; bh=i2o3lPX24fKmxQVeAxzXXKnFXNnmPunVGpcSChGJjZ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oWhYO3g0K94+vZU0XQv8j1Zn+qj3rgI1UtneQPeB53cYEwKUc77vmFaChRfW2m4lF6WilgTz9DBEljQFzVoU8FWlWhzQy5wvZw7cqJcYj12FV1X70IoxItbaG2rtZonTxVgFZ9aWCc56Okc+Nu1rh9Seko1QHFW/CYoWVBIJWwY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=lVzDYaXD; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lVzDYaXD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761810677; x=1793346677; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=i2o3lPX24fKmxQVeAxzXXKnFXNnmPunVGpcSChGJjZ4=; b=lVzDYaXD1JoJJnUqSkTB7HDMRCHfcWp0pxUcGEL1LkfKwFB5LJdxVP/W nhvTFQlj4av5gjObJzGXXfn1ngM/9Xs9t0HMDERbdPnhy96CGev8lGKEV O6cow1DIUP8qUqF84Lrg5lqbqC3Nj5LcD/6+zIx7/Xf01UzFNEy7BQwPt Pxbg1qEKPuShLmWYHWB0jphitrPkIl5jq2uUQTZHBXwdCSjaMrLZRX+/L VgibVpU8kEoL/nvbQ+sJ9KGXj9bFYy0lVUQgkfqjUMDnXVDYCG7xK9ysw 0yI2iXmoaEcL9DgVsxEYxJogMUKMIZ13qxS6L/LtCL8aHzECz2baaiITV g==; X-CSE-ConnectionGUID: IeEq9QgNQImjqH50CSPlVA== X-CSE-MsgGUID: r9Yv2KQcR6ynsQnSPqMt4w== X-IronPort-AV: E=McAfee;i="6800,10657,11597"; a="63977102" X-IronPort-AV: E=Sophos;i="6.19,266,1754982000"; d="scan'208";a="63977102" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2025 00:51:16 -0700 X-CSE-ConnectionGUID: I2DDdL9vQWaAvAcwSGvghg== X-CSE-MsgGUID: MHQTsx82RMa03zag5bzJtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,266,1754982000"; d="scan'208";a="186231747" Received: from fpallare-mobl4.ger.corp.intel.com (HELO ashevche-desk.local) ([10.245.245.174]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2025 00:51:12 -0700 Received: from andy by ashevche-desk.local with local (Exim 4.98.2) (envelope-from ) id 1vENR7-00000003ps3-2Wqs; Thu, 30 Oct 2025 09:51:09 +0200 Date: Thu, 30 Oct 2025 09:51:09 +0200 From: Andy Shevchenko To: Frank Li Cc: Alexandre Belloni , Miquel Raynal , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-iio@vger.kernel.org, joshua.yeong@starfivetech.com, devicetree@vger.kernel.org, Carlos Song , Adrian Fluturel Subject: Re: [PATCH v7 5/5] iio: magnetometer: Add mmc5633 sensor Message-ID: References: <20251027-i3c_ddr-v7-0-866a0ff7fc46@nxp.com> <20251027-i3c_ddr-v7-5-866a0ff7fc46@nxp.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Wed, Oct 29, 2025 at 11:54:39AM -0400, Frank Li wrote: > On Tue, Oct 28, 2025 at 12:50:55PM +0200, Andy Shevchenko wrote: > > On Mon, Oct 27, 2025 at 04:08:33PM -0400, Frank Li wrote: ... > > > +static const struct { > > > + int val; > > > + int val2; > > > > No need. Just > > > > > +} mmc5633_samp_freq[] = { > > There are some place will like > > if (mmc5633_samp_freq[i][0] == val && > mmc5633_samp_freq[i][1] == val2) > > previous > if (mmc5633_samp_freq[i].val == val && > mmc5633_samp_freq[i].val2 == val2) > > Previous version seem have better readablity. But it is not big deal, if > you like, I change to [0][1]. It's not my preference, it's how all but this driver do in IIO, it's about consistency of the style / patterns. ... > > struct i3c_device doesn't have a name, does it? > > It has name, but it is hexnumber (VID+PID), like 0-4a20000f000. > So use friend/readable name here. I think it's better to use the name provided by the subsystem. This way we may guarantee the unique one. The hard coded values potentially might collide (imagine some I³C driver for the very similar chip, let's say, in hwmon). -- With Best Regards, Andy Shevchenko