linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	glaubitz@physik.fu-berlin.de
Subject: Re: [PATCH v3 3/3] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision
Date: Fri, 16 Aug 2019 14:34:32 +0200	[thread overview]
Message-ID: <513d49dd-70fc-a226-fdfd-598aadcfec05@enpas.org> (raw)
In-Reply-To: <20190816115112.GA3507@kunai>

On 08/16/2019 01:51 PM, Wolfram Sang wrote:
> 
>> +	if (IS_ERR(new_fwnode))
>> +		dev_info(&z->dev, "Failed to create fwnode for LTC2990, error: %ld\n",
>> +			 PTR_ERR(new_fwnode));
>> +	else {
> 
> Braces for both blocks. Did you run checkpatch?

I did, and it didn't say anything.

Turns out I misremembered the CodingStyle as having a corner case where it doesn't. I'll fix the style - I dislike the above, too ;)


>> +		/*
>> +		 * Store the fwnode so we can destroy it on .remove().
>> +		 * Only store it on success, as fwnode_remove_software_node()
>> +		 * is NULL safe, but not PTR_ERR safe.
>> +		 */
>> +		i2c->ltc2990_fwnode = new_fwnode;
>> +		ltc2990_info.fwnode = new_fwnode;
>> +
>> +		i2c->ltc2990_client =
>> +			i2c_new_probed_device(&i2c->adapter,
>> +					      &ltc2990_info,
>> +					      icy_ltc2990_addresses,
>> +					      NULL);
> 
> i2c_new_device (or better, the new i2c_new_client_device) should be
> sufficient, or? You only have one potential address.

Yes and no. Now that you mention it - the LTC2990 can be at four addresses (0x4c - 0x4f), and there are jumpers (solder pads) on the PCB to select its address. Shall I add all 4 addresses to the array?

It's also possible that there is no LTC2990 at all (because it's hard to solder at home), and that's why we need to probe for it first. I believe i2c_new[_client]_device doesn't do probing, but rather assumes the device to be there. Correct?


Max

  reply	other threads:[~2019-08-16 12:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 12:58 [PATCH v3 1/3] i2c/busses: Add i2c-icy for I2C on m68k/Amiga Max Staudt
2019-08-15 12:58 ` [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support Max Staudt
2019-08-15 18:33   ` Guenter Roeck
2019-08-15 21:34     ` Max Staudt
2019-08-15 22:19   ` Max Staudt
2019-08-15 22:43     ` Guenter Roeck
2019-08-16  7:32       ` Geert Uytterhoeven
2019-08-16  8:37       ` Max Staudt
2019-08-16  9:07         ` [PATCH] " Max Staudt
2019-08-16 11:07           ` Geert Uytterhoeven
2019-08-16 12:26             ` Max Staudt
2019-08-16 12:36               ` Geert Uytterhoeven
2019-08-16 12:43                 ` Max Staudt
2019-08-16 13:24                   ` Guenter Roeck
2019-08-15 12:58 ` [PATCH v3 3/3] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision Max Staudt
2019-08-16 11:51   ` Wolfram Sang
2019-08-16 12:34     ` Max Staudt [this message]
2019-08-16 16:09       ` Wolfram Sang
2019-08-19 11:22         ` Max Staudt

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=513d49dd-70fc-a226-fdfd-598aadcfec05@enpas.org \
    --to=max@enpas.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).