public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jeff Lin <jefflin994697@gmail.com>,
	jdelvare@suse.com, linux@roeck-us.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	cedricjustine.encarnacion@analog.com, ninad@linux.ibm.com,
	andriy.shevchenko@linux.intel.com,
	johnerasmusmari.geronimo@analog.com, Mariel.Tinaco@analog.com,
	jbrunet@baylibre.com, kimseer.paller@analog.com,
	leo.yang.sy0@gmail.com, nuno.sa@analog.com,
	chiang.brian@inventec.com, gregkh@linuxfoundation.org,
	grantpeltier93@gmail.com, william@wkennington.com,
	krzysztof.kozlowski@linaro.org, tzungbi@kernel.org,
	thorsten.blum@linux.dev, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jeff Lin <jefflin994697@gmail.com>
Subject: Re: [PATCH] drivers/hwmon/pmbus: Add support for raa229141 in isl68137
Date: Fri, 26 Sep 2025 22:20:04 +0800	[thread overview]
Message-ID: <202509262212.QaMSQytw-lkp@intel.com> (raw)
In-Reply-To: <20250926014552.1625950-1-jefflin994697@gmail.com>

Hi Jeff,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v6.17-rc7]
[also build test WARNING on linus/master next-20250925]
[cannot apply to groeck-staging/hwmon-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jeff-Lin/drivers-hwmon-pmbus-Add-support-for-raa229141-in-isl68137/20250926-094703
base:   v6.17-rc7
patch link:    https://lore.kernel.org/r/20250926014552.1625950-1-jefflin994697%40gmail.com
patch subject: [PATCH] drivers/hwmon/pmbus: Add support for raa229141 in isl68137
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250926/202509262212.QaMSQytw-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250926/202509262212.QaMSQytw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509262212.QaMSQytw-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/hwmon/pmbus/isl68137.c:66:1: error: expected identifier
      66 | +#if IS_ENABLED(CONFIG_SENSORS_RAA229141)
         | ^
   drivers/hwmon/pmbus/isl68137.c:68:1: error: expected identifier
      68 | +#endif /* CONFIG_SENSORS_RAA229141 */
         | ^
>> drivers/hwmon/pmbus/isl68137.c:190:5: warning: no previous prototype for function 'read_isys_route_dma' [-Wmissing-prototypes]
     190 | int read_isys_route_dma(struct i2c_client *client, const char *addr)
         |     ^
   drivers/hwmon/pmbus/isl68137.c:190:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     190 | int read_isys_route_dma(struct i2c_client *client, const char *addr)
         | ^
         | static 
   1 warning and 2 errors generated.


vim +/read_isys_route_dma +190 drivers/hwmon/pmbus/isl68137.c

    25	
    26	enum chips {
    27		isl68137,
    28		isl68220,
    29		isl68221,
    30		isl68222,
    31		isl68223,
    32		isl68224,
    33		isl68225,
    34		isl68226,
    35		isl68227,
    36		isl68229,
    37		isl68233,
    38		isl68239,
    39		isl69222,
    40		isl69223,
    41		isl69224,
    42		isl69225,
    43		isl69227,
    44		isl69228,
    45		isl69234,
    46		isl69236,
    47		isl69239,
    48		isl69242,
    49		isl69243,
    50		isl69247,
    51		isl69248,
    52		isl69254,
    53		isl69255,
    54		isl69256,
    55		isl69259,
    56		isl69260,
    57		isl69268,
    58		isl69269,
    59		isl69298,
    60		raa228000,
    61		raa228004,
    62		raa228006,
    63		raa228228,
    64		raa229001,
    65		raa229004,
  > 66	+#if IS_ENABLED(CONFIG_SENSORS_RAA229141)
    67	+	raa229141,
    68	+#endif /* CONFIG_SENSORS_RAA229141 */
    69		raa229621,
    70	};
    71	
    72	enum variants {
    73		raa_dmpvr1_2rail,
    74		raa_dmpvr2_1rail,
    75		raa_dmpvr2_2rail,
    76		raa_dmpvr2_2rail_nontc,
    77	#if IS_ENABLED(CONFIG_SENSORS_RAA229141)
    78		raa_dmpvr2_2rail_isys,
    79	#endif /* CONFIG_SENSORS_RAA229141 */
    80		raa_dmpvr2_3rail,
    81		raa_dmpvr2_hv,
    82	};
    83	
    84	struct isl68137_channel {
    85		u32 vout_voltage_divider[2];
    86	};
    87	
    88	struct isl68137_data {
    89		struct pmbus_driver_info info;
    90		struct isl68137_channel channel[MAX_CHANNELS];
    91	};
    92	
    93	#define to_isl68137_data(x)	container_of(x, struct isl68137_data, info)
    94	
    95	static const struct i2c_device_id raa_dmpvr_id[];
    96	
    97	static ssize_t isl68137_avs_enable_show_page(struct i2c_client *client,
    98						     int page,
    99						     char *buf)
   100	{
   101		int val = pmbus_read_byte_data(client, page, PMBUS_OPERATION);
   102	
   103		return sprintf(buf, "%d\n",
   104			       (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS ? 1 : 0);
   105	}
   106	
   107	static ssize_t isl68137_avs_enable_store_page(struct i2c_client *client,
   108						      int page,
   109						      const char *buf, size_t count)
   110	{
   111		int rc, op_val;
   112		bool result;
   113	
   114		rc = kstrtobool(buf, &result);
   115		if (rc)
   116			return rc;
   117	
   118		op_val = result ? ISL68137_VOUT_AVS : 0;
   119	
   120		/*
   121		 * Writes to VOUT setpoint over AVSBus will persist after the VRM is
   122		 * switched to PMBus control. Switching back to AVSBus control
   123		 * restores this persisted setpoint rather than re-initializing to
   124		 * PMBus VOUT_COMMAND. Writing VOUT_COMMAND first over PMBus before
   125		 * enabling AVS control is the workaround.
   126		 */
   127		if (op_val == ISL68137_VOUT_AVS) {
   128			rc = pmbus_read_word_data(client, page, 0xff,
   129						  PMBUS_VOUT_COMMAND);
   130			if (rc < 0)
   131				return rc;
   132	
   133			rc = pmbus_write_word_data(client, page, PMBUS_VOUT_COMMAND,
   134						   rc);
   135			if (rc < 0)
   136				return rc;
   137		}
   138	
   139		rc = pmbus_update_byte_data(client, page, PMBUS_OPERATION,
   140					    ISL68137_VOUT_AVS, op_val);
   141	
   142		return (rc < 0) ? rc : count;
   143	}
   144	
   145	static ssize_t isl68137_avs_enable_show(struct device *dev,
   146						struct device_attribute *devattr,
   147						char *buf)
   148	{
   149		struct i2c_client *client = to_i2c_client(dev->parent);
   150		struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
   151	
   152		return isl68137_avs_enable_show_page(client, attr->index, buf);
   153	}
   154	
   155	static ssize_t isl68137_avs_enable_store(struct device *dev,
   156					struct device_attribute *devattr,
   157					const char *buf, size_t count)
   158	{
   159		struct i2c_client *client = to_i2c_client(dev->parent);
   160		struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
   161	
   162		return isl68137_avs_enable_store_page(client, attr->index, buf, count);
   163	}
   164	
   165	static SENSOR_DEVICE_ATTR_RW(avs0_enable, isl68137_avs_enable, 0);
   166	static SENSOR_DEVICE_ATTR_RW(avs1_enable, isl68137_avs_enable, 1);
   167	
   168	static struct attribute *enable_attrs[] = {
   169		&sensor_dev_attr_avs0_enable.dev_attr.attr,
   170		&sensor_dev_attr_avs1_enable.dev_attr.attr,
   171		NULL,
   172	};
   173	
   174	static const struct attribute_group enable_group = {
   175		.attrs = enable_attrs,
   176	};
   177	
   178	static const struct attribute_group *isl68137_attribute_groups[] = {
   179		&enable_group,
   180		NULL,
   181	};
   182	
   183	#if IS_ENABLED(CONFIG_SENSORS_RAA229141)
   184	#define RAA_READ_DMA_DATA	0xc5
   185	#define RAA_WRITE_DMA_ADDRESS 0xc7
   186	
   187	/* DMA address for input and output */
   188	static const unsigned char dma_address_in[] = { 0xD3, 0xE0 };
   189	static const unsigned char dma_address_out[] = { 0x42, 0xEE };
 > 190	int read_isys_route_dma(struct i2c_client *client, const char *addr)
   191	{
   192		int ret;
   193	
   194		ret = i2c_smbus_write_i2c_block_data(client, RAA_WRITE_DMA_ADDRESS, 2, addr);
   195		if (ret < 0) {
   196			dev_err(&client->dev, "Set DMA address failed for address 0x%02x 0x%02x\n",
   197				addr[0], addr[1]);
   198			return ret;
   199		}
   200		// DIRECT ISYS format 10mA/LSB
   201		u8 buf[2];
   202	
   203		ret = i2c_smbus_read_i2c_block_data(client, RAA_READ_DMA_DATA, 2, buf);
   204		if (ret < 0)
   205			return ret;
   206		u16 value = ((u16)buf[1]<<8) | buf[0];
   207		return value;
   208	};
   209	#endif /* CONFIG_SENSORS_RAA229141 */
   210	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2025-09-26 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  1:45 [PATCH] drivers/hwmon/pmbus: Add support for raa229141 in isl68137 Jeff Lin
2025-09-26  8:27 ` Guenter Roeck
2025-11-06  9:33   ` Jeff Lin
2025-09-26 13:05 ` kernel test robot
2025-09-26 13:24 ` Guenter Roeck
2025-09-26 14:20 ` kernel test robot [this message]
2025-11-06  9:31 ` [PATCH v2] " Jeff Lin
2025-11-06  9:42   ` Andy Shevchenko
2025-11-10  1:09     ` Jeff Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509262212.QaMSQytw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Mariel.Tinaco@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=cedricjustine.encarnacion@analog.com \
    --cc=chiang.brian@inventec.com \
    --cc=grantpeltier93@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbrunet@baylibre.com \
    --cc=jdelvare@suse.com \
    --cc=jefflin994697@gmail.com \
    --cc=johnerasmusmari.geronimo@analog.com \
    --cc=kimseer.paller@analog.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=leo.yang.sy0@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llvm@lists.linux.dev \
    --cc=ninad@linux.ibm.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=thorsten.blum@linux.dev \
    --cc=tzungbi@kernel.org \
    --cc=william@wkennington.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox