usb: usb251xb: simplify reset helper
authorMarco Felsch <m.felsch@pengutronix.de>
Tue, 17 Sep 2019 14:44:48 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:26:13 +0000 (14:26 +0200)
commita9bab25556f142c696c660f4be54dba9808403d2
tree0c2b601f5cfe7cf495da915c69a1cfbb26c3a709
parent4d7201cda226d7cffb591d94ca66ca0960891126
usb: usb251xb: simplify reset helper

Currently the reset handler was always called to deassert the reset
line because assert the line was done during probe. Now if we want to
support pm by turn of the supply we need to call this routine twice and
the i2c_lock_bus is done twice too. To simplify that we can drop the
state and just do a reset in one go. So a future pm operation don't need
to lock the i2c bus twice.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
Tested-by: Richard Leitner <richard.leitner@skidata.com>
Link: https://lore.kernel.org/r/20190917144449.32739-4-m.felsch@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usb251xb.c