[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdboZ==0iWW8vTxfjJrVnqKiGA_abJkJANWCjUjb7MOZA@mail.gmail.com>
Date: Fri, 16 Feb 2018 15:33:59 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
USB <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 10/12] usb: typec: driver for Pericom PI3USB30532 Type-C
cross switch
On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede <hdegoede@...hat.com> wrote:
> Add a driver for the Pericom PI3USB30532 Type-C cross switch /
> mux chip found on some devices with a Type-C port.
> +static int pi3usb30532_set_conf(struct pi3usb30532 *pi, u8 new_conf)
> +{
> + int ret = 0;
> +
> + if (pi->conf == new_conf)
> + return 0;
> +
> + ret = i2c_smbus_write_byte_data(pi->client, PI3USB30532_CONF, new_conf);
> + if (ret == 0)
> + pi->conf = new_conf;
> + else
> + dev_err(&pi->client->dev, "Error writing conf: %d\n", ret);
Usual pattern, please.
if (ret) {
...
return ret;
}
return 0;
> +
> + return ret;
> +}
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists