summaryrefslogtreecommitdiffstats
path: root/drivers/mux/core.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: remove struct module * setting from struct classGreg Kroah-Hartman2023-03-171-1/+0
| | | | | | | | | | | | | There is no need to manually set the owner of a struct class, as the registering function does it automatically, so remove all of the explicit settings from various drivers that did so as it is unneeded. This allows us to remove this pointer entirely from this structure going forward. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Link: https://lore.kernel.org/r/20230313181843.1207845-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: Fix struct mux_state kernel-doc commentYang Li2022-02-041-1/+1
| | | | | | | | | | | | | A warning is reported because a colon was dropped, it is found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/mux/core.c:44: warning: Function parameter or member 'state' not described in 'mux_state' Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/a9a970fc-63f9-5ab9-4983-fba5b01bebe2@axentia.se Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: fix grammar, missing "is".Peter Rosin2022-02-041-1/+1
| | | | | | | | This makes it easier to parse. Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/75067db8-0264-c49c-daa8-d7a877932711@axentia.se Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: add missing mux_state_getPeter Rosin2022-02-041-11/+29
| | | | | | | | | | | | And implement devm_mux_state_get in terms of the new function. Now we have both mux_state_get and mux_state_put as convenient functions ready to be exported should someone ever need unmanaged interfaces. Tested-by: Aswath Govindraju <a-govindraju@ti.com> Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/6f8cfdfd-9fa6-40d1-09b3-0c9fc50835ac@axentia.se Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: Add support for reading mux state from consumer DT nodeAswath Govindraju2022-02-041-21/+198
| | | | | | | | | | | | In some cases, we might need to provide the state of the mux to be set for the operation of a given peripheral. Therefore, pass this information using mux-states property. Link: https://lore.kernel.org/lkml/20211123081222.27979-1-a-govindraju@ti.com Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Signed-off-by: Peter Rosin <peda@axentia.se> (minor edits) Link: https://lore.kernel.org/r/aac25be8-9515-a980-f7cb-709938c84822@axentia.se Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: add support for delay after muxingVincent Whitchurch2021-10-211-6/+32
| | | | | | | | | | | | | | Hardware may require some time for the muxed analog signals to settle after the muxing is changed. Allow users of the mux subsystem to specify this delay with the new mux_control_select_delay() function (and the _try equivalent). Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/20211007134641.13417-2-vincent.whitchurch@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* drivers: Introduce device lookup variants by of_nodeSuzuki K Poulose2019-07-301-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce wrappers for {bus/driver/class}_find_device() to locate devices by its of_node. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: devicetree@vger.kernel.org Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: linux-i2c@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-spi@vger.kernel.org Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Takashi Iwai <tiwai@suse.com> Cc: Alan Tull <atull@kernel.org> Cc: linux-fpga@vger.kernel.org Cc: Peter Rosin <peda@axentia.se> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Thor Thayer <thor.thayer@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Peter Rosin <peda@axentia.se> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> # I2C part Acked-by: Moritz Fischer <mdf@kernel.org> # For FPGA part Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20190723221838.12024-3-suzuki.poulose@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'char-misc-4.16-rc1' of ↵Linus Torvalds2018-02-011-4/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big pull request for char/misc drivers for 4.16-rc1. There's a lot of stuff in here. Three new driver subsystems were added for various types of hardware busses: - siox - slimbus - soundwire as well as a new vboxguest subsystem for the VirtualBox hypervisor drivers. There's also big updates from the FPGA subsystem, lots of Android binder fixes, the usual handful of hyper-v updates, and lots of other smaller driver updates. All of these have been in linux-next for a long time, with no reported issues" * tag 'char-misc-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (155 commits) char: lp: use true or false for boolean values android: binder: use VM_ALLOC to get vm area android: binder: Use true and false for boolean values lkdtm: fix handle_irq_event symbol for INT_HW_IRQ_EN EISA: Delete error message for a failed memory allocation in eisa_probe() EISA: Whitespace cleanup misc: remove AVR32 dependencies virt: vbox: Add error mapping for VERR_INVALID_NAME and VERR_NO_MORE_FILES soundwire: Fix a signedness bug uio_hv_generic: fix new type mismatch warnings uio_hv_generic: fix type mismatch warnings auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE uio_hv_generic: add rescind support uio_hv_generic: check that host supports monitor page uio_hv_generic: create send and receive buffers uio: document uio_hv_generic regions doc: fix documentation about uio_hv_generic vmbus: add monitor_id and subchannel_id to sysfs per channel vmbus: fix ABI documentation uio_hv_generic: use ISR callback method ...
| * mux: add SPDX identifiers to all mux source filesPeter Rosin2018-01-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all free-text license texts. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. No copyright headers or other non-license-description text was removed. Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mux: core: fix double get_device()Hans de Goede2018-01-091-1/+3
|/ | | | | | | | | | | class_find_device already does a get_device on the returned device. So the device returned by of_find_mux_chip_by_node is already referenced and we should not reference it again (and unref it on error). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Peter Rosin <peda@axentia.se> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: make device_type constBhumika Goyal2017-08-291-1/+1
| | | | | | | | | | Make this const as it is only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mux: zap mux- prefix from the source filesPeter Rosin2017-08-281-0/+547
Preserve the module names with Makefile additions. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>