linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux I2C <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 <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [PATCH v2 2/4] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision
Date: Tue, 13 Aug 2019 11:49:05 +0200	[thread overview]
Message-ID: <fa145f84-4249-44da-57dc-10cfe25dbde3@enpas.org> (raw)
In-Reply-To: <CAMuHMdX3NtKwxb6BJzJR1qLs5vC9zhU3d+cdrrHx4B9r1opkvQ@mail.gmail.com>

On 08/13/2019 09:03 AM, Geert Uytterhoeven wrote:
> Hi Max,
> 
> On Tue, Aug 13, 2019 at 1:53 AM Max Staudt <max@enpas.org> wrote:
>> Since the 2019 a1k.org community re-print of these PCBs sports an
>> LTC2990 hwmon chip as an example use case, let this driver autoprobe
>> for that as well. If it is present, modprobing ltc2990 is sufficient.
>>
>> Signed-off-by: Max Staudt <max@enpas.org>
> 
> Thanks for your patch!
> 
>> --- a/drivers/i2c/busses/i2c-icy.c
>> +++ b/drivers/i2c/busses/i2c-icy.c
>> @@ -160,6 +180,8 @@ static void icy_remove(struct zorro_dev *z)
>>  {
>>         struct icy_i2c *i2c = dev_get_drvdata(&z->dev);
>>
>> +       i2c_unregister_device(i2c->client_ltc2990);
> 
> Is this needed?
> In my understanding, i2c_del_adapter() below takes care of that.
It seems to do that in i2c_del_adapter():

  device_for_each_child(&adap->dev, NULL, __unregister_dummy);


However, I'm not sure I'm supposed to do that. I went by Documentation/i2c/instantiating-devices, which in "Method 2" says:

  The driver which instantiated the I2C device is responsible for destroying
  it on cleanup. This is done by calling i2c_unregister_device() on the
  pointer that was earlier returned by i2c_new_device() or
  i2c_new_probed_device().


So, what is preferred and why?


Thanks!

Max

  reply	other threads:[~2019-08-13  9:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 23:52 [PATCH v2 1/4] i2c/busses: Add i2c-icy for I2C on m68k/Amiga Max Staudt
2019-08-12 23:52 ` [PATCH v2 2/4] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision Max Staudt
2019-08-13  7:03   ` Geert Uytterhoeven
2019-08-13  9:49     ` Max Staudt [this message]
2019-08-14 19:52       ` Wolfram Sang
2019-08-12 23:52 ` [PATCH v2 3/4] hwmon/ltc2990: Add platform_data support Max Staudt
2019-08-13  6:59   ` Geert Uytterhoeven
2019-08-13  8:02   ` Guenter Roeck
2019-08-13  8:27     ` Geert Uytterhoeven
2019-08-13 13:27       ` Guenter Roeck
2019-08-13 13:32         ` Geert Uytterhoeven
2019-08-13 10:10     ` Max Staudt
2019-08-13 13:24       ` Guenter Roeck
2019-08-13 13:31         ` Max
2019-08-14 18:11         ` Max Staudt
2019-08-12 23:52 ` [PATCH v2 4/4] i2c/busses/i2c-icy: Add platform_data for LTC2990 Max Staudt
2019-08-13  7:04   ` Geert Uytterhoeven
2019-08-13  7:08 ` [PATCH v2 1/4] i2c/busses: Add i2c-icy for I2C on m68k/Amiga Geert Uytterhoeven
2019-08-13  9:50   ` Max Staudt
2019-08-14 19:47 ` Wolfram Sang
2019-08-14 22:33   ` Max Staudt
2019-08-15  7:12     ` Wolfram Sang
2019-08-15 10:00       ` Max Staudt
2019-08-15 11:48         ` Wolfram Sang
2019-08-15 11:52           ` Max
2019-08-15 12:04             ` Wolfram Sang
2019-08-15 12:10               ` Max Staudt
2019-08-15 12:52                 ` Wolfram Sang

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=fa145f84-4249-44da-57dc-10cfe25dbde3@enpas.org \
    --to=max@enpas.org \
    --cc=geert@linux-m68k.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 \
    /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).