Re: [PATCH 00/34] treewide: simplify getting the adapter of an I2C client

2019-06-09 Thread Peter Rosin
On 2019-06-08 12:55, Wolfram Sang wrote: > While preparing a refactoring series, I noticed that some drivers use a > complicated way of determining the adapter of a client. The easy way is > to use the intended pointer: client->adapter > > These drivers do: > to_i2c_adapter(client->dev.paren

Re: [PATCH v6 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-31 Thread Peter Rosin
On 2018-09-01 00:56, Janusz Krzysztofik wrote: > Most users of get/set array functions iterate consecutive bits of data, > usually a single integer, while processing array of results obtained > from, or building an array of values to be passed to those functions. > Save time wasted on those iterati

Re: [PATCH v5 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-29 Thread Peter Rosin
mux_gpio->val); > + mux_gpio->gpios->desc, value_bitmap); > > return 0; > } Dito for this driver. Just squash the following and be done with it, no attribution needed... With that (for the changes in i2c-mux-gpio.c and mux/gpio.

Re: [RFC RFT PATCH v4 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-21 Thread Peter Rosin
Sorry for replying to self... On 2018-08-21 08:49, Peter Rosin wrote: > On 2018-08-21 01:43, Janusz Krzysztofik wrote: >> Most users of get/set array functions iterate consecutive bits of data, >> usually a single integer, while or processing array of results obtained >> from

Re: [RFC RFT PATCH v4 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-21 Thread Peter Rosin
On 2018-08-21 01:43, Janusz Krzysztofik wrote: > Most users of get/set array functions iterate consecutive bits of data, > usually a single integer, while or processing array of results obtained > from or building an array of values to be passed to those functions. > Save time wasted on those itera

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-25 Thread Peter Rosin
On 2017-09-25 13:35, Hans de Goede wrote: > Hi, > > On 25-09-17 12:34, Peter Rosin wrote: >> On 2017-09-13 17:48, Hans de Goede wrote: >>> Hi, >>> >>> On 13-09-17 17:07, Rob Herring wrote: >>>> On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-25 Thread Peter Rosin
On 2017-09-13 17:48, Hans de Goede wrote: > Hi, > > On 13-09-17 17:07, Rob Herring wrote: >> On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede wrote: >>> Hi, >>> >>> >>> On 13-09-17 15:38, Rob Herring wrote: On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede wrote: > > Hi, >

Re: [PATCH v2 03/11] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-10 Thread Peter Rosin
On 2017-09-08 19:07, Hans de Goede wrote: > Hi, > > On 08-09-17 17:47, Peter Rosin wrote: >> On 2017-09-05 18:42, Hans de Goede wrote: >>> Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by >>> USB device/host, resp. Type-C pola

Re: [PATCH 1/2] mux: add mux_control_get_optional() API

2017-09-08 Thread Peter Rosin
On 2017-09-08 17:45, Peter Rosin wrote: > From: Stephen Boyd > > Sometimes drivers only use muxes under certain scenarios. For > example, the chipidea usb controller may be connected to a usb > switch on some platforms, and connected directly to a usb port on > others. The dri

Re: [PATCH v2 03/11] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-08 Thread Peter Rosin
On 2017-09-05 18:42, Hans de Goede wrote: > Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by > USB device/host, resp. Type-C polarity/role/altmode mux drivers and > consumers to ensure that they agree on the meaning of the > mux_control_select() state argument. > > Signed

[PATCH 1/2] mux: add mux_control_get_optional() API

2017-09-08 Thread Peter Rosin
From: Stephen Boyd Sometimes drivers only use muxes under certain scenarios. For example, the chipidea usb controller may be connected to a usb switch on some platforms, and connected directly to a usb port on others. The driver won't know one way or the other though, so add a mux_control_get_opt

Re: [PATCH v2 04/11] usb: xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2017-09-08 Thread Peter Rosin
On 2017-09-05 18:42, Hans de Goede wrote: > The Intel cherrytrail xhci controller has an extended cap mmio-range > which contains registers to control the muxing to the xhci (host mode) > or the dwc3 (device mode) and vbus-detection for the otg usb-phy. > > Having a mux driver included in the xhci

[PATCH 2/2] mux: add explicit hook to leave the mux as-is on init/registration

2017-09-08 Thread Peter Rosin
A board may need a mux controller to stay as-is for a while longer, e.g. if setting the normally preferred idle state destroys booting. The mechanism provided here is not perfect in two ways. 1. As soon as the mux controller is registered, some mux consumer can access it and set a state that de

Re: [PATCH v2 05/11] mux: Add Intel Cherrytrail USB mux driver

2017-09-08 Thread Peter Rosin
On 2017-09-05 18:42, Hans de Goede wrote: > Intel Cherrytrail SoCs have an internal USB mux for muxing the otg-port > USB data lines between the xHCI host controller and the dwc3 gadget > controller. On some Cherrytrail systems this mux is controlled through > AML code reacting on a GPIO IRQ connec

Re: [PATCH 06/11] mux: Add Pericom PI3USB30532 Type-C mux driver

2017-09-05 Thread Peter Rosin
On 2017-09-04 13:19, Peter Rosin wrote: > Hi! > > One comment inline... Oh, and one more small nit, I think you should do s/pi3usb30532_mux/pi3usb30532/g to shorten the identifiers a bit. The _mux suffix (or infix) is kind of selfevident from where the file liv

Re: [PATCH 00/11] mux/typec: Add USB / TypeC mux drivers and hook them up on some x86 systems

2017-09-04 Thread Peter Rosin
On 2017-09-01 23:48, Hans de Goede wrote: > Hi All, > > This series consists of 4 parts: > > 1) Core mux changes to add support for getting mux-controllers on >non DT platforms and to add some standardised state values for USB > > 2) Add Intel CHT USB mux and Pericom-PI3USB30532 Type-C mux d

Re: [PATCH 02/11] mux: core: Add support for getting a mux controller on a non DT platform

2017-09-04 Thread Peter Rosin
Hi! Some comments inline... On 2017-09-01 23:48, Hans de Goede wrote: > On non DT platforms we cannot get the mux_chip by pnode. Other subsystems > (regulator, clock, pwm) have the same problem and solve this by allowing > platform / board-setup code to add entries to a lookup table and then use

Re: [PATCH 05/11] mux: Add Intel Cherrytrail USB mux driver

2017-09-04 Thread Peter Rosin
Hi! Some comments inline... On 2017-09-01 23:48, Hans de Goede wrote: > Intel Cherrytrail SoCs have an internal USB mux for muxing the otg-port > USB data lines between the xHCI host controller and the dwc3 gadget > controller. On some Cherrytrail systems this mux is controlled through > AML code

Re: [PATCH 06/11] mux: Add Pericom PI3USB30532 Type-C mux driver

2017-09-04 Thread Peter Rosin
Hi! One comment inline... On 2017-09-01 23:48, Hans de Goede wrote: > Add a driver for the Pericom PI3USB30532 Type-C cross switch / > mux chip found on some devices with a Type-C port. > > Signed-off-by: Hans de Goede > --- > drivers/mux/Kconfig | 10 + > drivers/mux/Makefile |

Re: [RESEND PATCH] staging: vboxvideo: remove dead gamma lut code

2017-08-08 Thread Peter Rosin
On 2017-08-07 11:21, Daniel Vetter wrote: > On Fri, Aug 04, 2017 at 12:45:06PM +0200, Peter Rosin wrote: >> The redundant fb helpers .load_lut, .gamma_set and .gamma_get are >> no longer used. Remove the dead code that was not doing anything >> sensible anyway. >> &g

[RESEND PATCH] staging: vboxvideo: remove dead gamma lut code

2017-08-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code that was not doing anything sensible anyway. Signed-off-by: Peter Rosin --- drivers/staging/vboxvideo/vbox_fb.c | 15 --- drivers/staging/vboxvideo/vbox_mode.c | 5 - 2

[PATCH] staging: vboxvideo: remove dead gamma lut code

2017-08-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code that was not doing anything sensible anyway. Signed-off-by: Peter Rosin --- drivers/staging/vboxvideo/vbox_fb.c | 15 --- drivers/staging/vboxvideo/vbox_mode.c | 5 - 2