All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Robert Richter <rrichter@marvell.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-i2c@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Phil Reid <preid@electromag.com.au>,
	Jean Delvare <jdelvare@suse.com>,
	George Cherian <gcherian@marvell.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR
Date: Mon, 17 Feb 2020 09:17:58 +0100	[thread overview]
Message-ID: <20200217081758.GA2814@ninjato> (raw)
In-Reply-To: <20200217075837.2agub5deqdpet3ce@rric.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]


> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> > -struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
> > +struct i2c_client *i2c_install_smbus_alert(struct i2c_adapter *adapter,
> >  					 struct i2c_smbus_alert_setup *setup);
> 
> This function naming is a bit odd. It creates a struct i2c_client.
> Then, there is also i2c_new_client_device() and i2c_new_device(). For
> i2c_new_client_device() there are no users at all outside of
> i2c-core-base.c (except for Falcon NIC), it is only a wrapper.

i2c_new_device (and friends) returned NULL on error. I am currently
converting all i2c_new_* functions to return an ERRPTR. So,
i2c_new_client_device is the new function, i2c_new_device is deprecated.
If you check v5.6-rc1, you will find many more users. Similarily,
i2c_new_dummy is deprecated (and removed already), i2c_new_dummy_device
is the new thing.

> So how about reducing the interface to those both only to:?
> 
>  i2c_new_device()
>  i2c_new_device_smbus()

Given the above, it would be:

	i2c_new_client_device()
	i2c_new_smbus_device()

Yet, I think this is too vague. Maybe

	i2c_new_smbus_alert_device()

? Note that I never used SMBus Alert, so I am happy for feedback from
people actually using it.

Thanks for the comment!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-02-17  8:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 17:29 [PATCH 0/3] i2c: updates to SMBus alert setup Wolfram Sang
2020-02-10 17:29 ` [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Wolfram Sang
2020-02-13 10:10   ` kbuild test robot
2020-02-13 10:10   ` [PATCH] i2c: fix ptr_ret.cocci warnings kbuild test robot
2020-02-15  6:20   ` [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Jean Delvare
2020-02-15  6:20     ` Jean Delvare
2020-02-15  6:50     ` Wolfram Sang
2020-02-15  8:11       ` Jean Delvare
2020-02-17  7:58   ` Robert Richter
2020-02-17  7:58     ` Robert Richter
2020-02-17  8:17     ` Wolfram Sang [this message]
2020-02-17  9:14       ` Luca Ceresoli
2020-02-17 10:00         ` Robert Richter
2020-02-17 10:00           ` Robert Richter
2020-02-17 13:29           ` Wolfram Sang
2020-02-10 17:29 ` [PATCH 2/3] i2c: rename of_i2c_setup_smbus_alert() to keep in sync Wolfram Sang
2020-02-10 17:29 ` [PATCH 3/3] i2c: smbus: remove outdated references to irq level triggers 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=20200217081758.GA2814@ninjato \
    --to=wsa@the-dreams.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gcherian@marvell.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=rrichter@marvell.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.