- 22 11月, 2016 3 次提交
-
-
由 Peter Robinson 提交于
The devices here are specific to x86 so lets depend on x86. Signed-off-by: NPeter Robinson <pbrobinson@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geliang Tang 提交于
Use builtin_platform_driver() helper to simplify the code. Signed-off-by: NGeliang Tang <geliangtang@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geliang Tang 提交于
Use builtin_platform_driver() helper to simplify the code. Signed-off-by: NGeliang Tang <geliangtang@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 17 11月, 2016 1 次提交
-
-
由 Venkat Reddy Talla 提交于
Adding max20024 compatible string to the device id list to support both max77620 and max20024 devices. Signed-off-by: NVenkat Reddy Talla <vreddytalla@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 15 11月, 2016 3 次提交
-
-
由 Geliang Tang 提交于
Use builtin_pci_driver() helper to simplify the code. Signed-off-by: NGeliang Tang <geliangtang@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
When a GPIO line is marked as used for an interrupt, it is helpful to set the label to "interrupt" so we know what is going on when inspecting the lines. If a GPIO is already properly named by gpiod_get*() we don't need to do this. It only happens when a line is used from the irqchip side of a GPIO driver without communicating with the GPIO side, such as when gpiochip is used as interrupt provider in the device tree. If the line is still marked as used by "interrupt" when we unmark it as used by an interrupt, also remove this label from the descriptor. Also shape up the code around unmarking IRQ lines. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
I saw weird values != [0,1] being passed down to drivers in their .set_direction_output() callbacks. Go over the gpiolib and make sure to hammer it to [0,1] before hitting the driver to avoid undesired side effects. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 13 11月, 2016 1 次提交
-
-
由 Linus Walleij 提交于
When the hardware is in output mode, reading the value from the hardware is not giving the correct value back. Instead read the value from the cache so we get the right value. Suggested-by: NRussell King <linux@arm.linux.org.uk> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 12 11月, 2016 1 次提交
-
-
由 Linus Walleij 提交于
This makes is possible to read out the current direction of a GPIO line on the HTC CPLD GPIO expander. Suggested-by: NRussell King <linux@arm.linux.org.uk> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 09 11月, 2016 2 次提交
-
-
由 Arnd Bergmann 提交于
The newly added acpi_gpiochip_scan_gpios function produces a few harmless warnings: drivers/gpio/gpiolib-acpi.c: In function ‘acpi_gpiochip_add’: drivers/gpio/gpiolib-acpi.c:925:7: error: ‘dflags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/gpio/gpiolib-acpi.c:925:9: error: ‘lflags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem is that he compiler cannot know that a negative return value from fwnode_property_read_u32_array() or acpi_gpiochip_pin_to_gpio_offset() implies that the IS_ERR(gpio_desc) is true, as the value could in theory be below -MAX_ERRNO. The function already initializes its output values to zero, and moving that intialization a little higher up ensures that we can never have uninitialized data in the caller. Fixes: c80f1ba7 ("ACPI / gpio: Add hogging support") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Haslam 提交于
The gpiod framework uses the chip label to match a specific chip. The davinci gpio driver, creates several chips using always the same label, which is not compatible with gpiod. To allow platform data to declare gpio lookup tables, and for drivers to use the gpiod framework, allocate unique label per registered chip. Signed-off-by: NAxel Haslam <ahaslam@baylibre.com> Reviewed-by: NSekhar Nori <nsekhar@ti.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 05 11月, 2016 1 次提交
-
-
由 Paul Gortmaker 提交于
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config HTC_EGPIO drivers/gpio/Kconfig: bool "HTC EGPIO support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Kevin O'Connor <kevin@koconnor.net> Cc: linux-gpio@vger.kernel.org Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 31 10月, 2016 3 次提交
-
-
由 Wei Yongjun 提交于
When terminating for_each_available_child_of_node() iteration with break or return, of_node_put() should be used to prevent stale device node references from being left behind. This is detected by Coccinelle semantic patch. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Reviewed-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wei Yongjun 提交于
Fixes the following sparse warning: drivers/gpio/gpiolib-acpi.c:863:18: warning: symbol 'acpi_gpiochip_parse_own_gpio' was not declared. Should it be static? Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wei Yongjun 提交于
fwnode_handle_put() should be used when terminating device_for_each_child_node() iteration with break or return to prevent stale device node references from being left behind. This is detected by Coccinelle semantic patch. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 26 10月, 2016 1 次提交
-
-
由 Thor Thayer 提交于
Confirm the chip->parent is valid before dereferencing because the parent parameter is optional. Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 25 10月, 2016 1 次提交
-
-
由 Wei Yongjun 提交于
It's not necessary to unregister gpio_chip which registered with devm_gpiochip_add_data(). Also get rid of useless altr_a10sr_gpio_remove(). Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 24 10月, 2016 12 次提交
-
-
由 Sascha Hauer 提交于
According to the reference manual level interrupts can't be acked using the IRQSTAT registers. The effect is that when a level interrupt triggers the following ack is a no-op and the same interrupt triggers again right after it has been unmasked after running the interrupt handler. The reference manual says: Status bits for pins configured as level sensitive interrupts cannot be cleared unless either the actual pin is in the non-interrupting state, or the pin has been disabled as an interrupt source by clearing its bit in HW_PINCTRL_PIN2IRQ. To work around the duplicated interrupts we can use the PIN2IRQ rather than the IRQEN registers to mask the interrupts. This probably does not work for the edge interrupts, so we have to split up the irq chip into two chip types, one for the level interrupts and one for the edge interrupts. We now make use of two different enable registers, so we have to take care to always enable the right one, especially during switching of the interrupt type. An easy way to accomplish this is to use the IRQCHIP_SET_TYPE_MASKED which makes sure that set_irq_type is called with masked interrupts. With this the flow to change the irq type is like: - core masks interrupt (using the current chip type) - mxs_gpio_set_irq_type() changes chip type if necessary - mxs_gpio_set_irq_type() unconditionally sets the enable bit in the now unused enable register - core eventually unmasks the interrupt (using the new chip type) Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Sascha Hauer 提交于
The mxs gpio controller does not only have a mask register to mask interrupts, but also enable/disable registers. Use the enable/disable registers rather than the mask register. This does not have any advantage for now, but makes the next patch simpler. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mika Westerberg 提交于
Now that we have the new helper function that sets nice names for GPIO lines based on "gpio-line-names" device property, we can take advantage of this in acpi_gpiochip_add(). Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mika Westerberg 提交于
In order to use "gpio-line-names" property in systems not having DT as their boot firmware, rework of_gpiochip_set_names() to use device property accessors. This reworked function is placed in a separate file making it clear it deals with universal device properties. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mika Westerberg 提交于
GPIO hogging means that the GPIO controller can "hog" and configure certain GPIOs without need for a driver or userspace to do that. This is useful in open-connected boards where BIOS cannot possibly know beforehand which devices will be connected to the board. This adds GPIO hogging mechanism to ACPI analogous to Device Tree. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mika Westerberg 提交于
Make it possible to have an empty GPIOs in a GPIO list for device. For example a SPI master may use both GPIOs and native pins as chip selects and we need to be able to distinguish between the two. This makes it mandatory to have exactly 3 arguments for GPIOs and then converts gpiolib to use of __acpi_node_get_property_reference() instead. In addition we make acpi_gpio_package_count() to handle holes as well (this matches the DT version). Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Marek Vasut 提交于
Add compatible string for the MAX7318 part. This is a two bank, 16 lines, I2C GPIO expander with interrupt line. Signed-off-by: NMarek Vasut <marex@denx.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jean Delvare 提交于
All the boards supported by the gpio-ts4900 driver are i.MX6 boards, so only offer the driver for building on this platform, unless build-testing. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: Lucile Quirion <lucile.quirion@savoirfairelinux.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thor Thayer 提交于
Add the GPIO functionality for the Altera Arria10 MAX5 System Resource Chip. The A10 MAX5 has 12 bits of GPIO assigned to switches, buttons, and LEDs as a GPIO extender on the SPI bus. Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>i Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
We switch the default handler to be handle_bad_irq() instead of handle_simple_irq() (which was not correct anyway). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
Current code does not use gpio_irq/irq_base/gpio_base fields from struct max77620_gpio, so remove them. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Neil Armstrong 提交于
Since the I2C sx150x GPIO expander driver uses platform_data to manage the pins configurations, rewrite the driver as a pinctrl driver using pinconf to get/set pin configurations from DT or debugfs. The pinctrl driver is functionnally equivalent as the gpio-only driver and can use DT for pinconf. The platform_data confirmation is dropped. This patchset removed the gpio-only driver and selects the Pinctrl driver config instead. This patchset also migrates the gpio dt-bindings to pinctrl and add the pinctrl optional properties. The driver was tested with a SX1509 device on a BeagleBone black with interrupt support and on an X86_64 machine over an I2C to USB converter. This is a fixed version that builds and runs on non-OF platforms and on arm based OF. The GPIO version is removed and the bindings are also moved to the pinctrl bindings. Changes since v2 - rebased on v4.9-rc1 - removed MODULE_DEVICE_TABLE as in upstream bb411e77 ("gpio: sx150x: fix implicit assumption module.h is present") Changes since v1 - Fix Kconfig descriptions on pinctrl and gpio - Fix Kconfig dependency - Remove oscio support for non-789 devices - correct typo in dt bindings - remove probe reset for non-789 devices Changes since RFC - Put #ifdef CONFIG_OF/CONFIG_OF_GPIO to remove OF code for non-of platforms - No more rely on OF_GPIO config - Moved and enhanced bindings to pinctrl bindings - Removed gpio-sx150x.c - Temporary select PINCTRL_SX150X when GPIO_SX150X - Temporary mark GPIO_SX150X as deprecated Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Tested-by: NPeter Rosin <peda@axentia.se> Acked-by: NRob Herring <robh@kernel.org> ested-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 21 10月, 2016 9 次提交
-
-
由 Joao Pinto 提交于
Although I am leaving Synopsys, I would like to keep working with the linux kernel community and help in what you might find useful. For that I am sending this patch to change my contact e-mail. Signed-off-by: NJoao Pinto <jpinto@synopsys.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Hannes Reinecke 提交于
The libfc stack assigns exchange IDs based on the CPU the request was received on, so we need to send the responses via the same CPU. Otherwise the send logic gets confuses and responses will be delayed, causing exchange timeouts on the initiator side. Signed-off-by: NHannes Reinecke <hare@suse.com> Cc: stable@vger.kernel.org # 4.5+ Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
由 Hannes Reinecke 提交于
Update the debug statements to match those from libfc. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
由 Hannes Reinecke 提交于
Not every failure is due to out-of-memory; the ACLs might not be set, too. So return a detailed error code in ft_sess_create() instead of just a NULL pointer. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
由 Hannes Reinecke 提交于
When allocating a new command we should add the pointer to the debug statements; that allows us to match this with other debug statements for handling data. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
由 Hannes Reinecke 提交于
target_sess_cmd_list_waiting() might hit on a condition where the kref for the command is already 0, but the destructor has not been called yet (or is stuck in waiting for a spin lock). Rather than leaving the command on the list we should explicitly remove it to avoid race issues later on. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
由 Mika Westerberg 提交于
It turns out we need to ping the watchdog hardware on resume when we re-program it. Otherwise this causes inadvertent reset to trigger right after the resume is complete. Fixes: 058dfc76 (ACPI / watchdog: Add support for WDAT hardware watchdog) Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Chen-Yu Tsai 提交于
struct clocksource is also used by the clk notifier callback, to unregister and re-register the clocksource with a different clock rate. clocksource_mmio_init does not pass back a pointer to the struct used, and the clk notifier callback assumes that the struct clocksource in struct sun5i_timer_clksrc is valid. This results in a kernel NULL pointer dereference when the hstimer clock is changed: Unable to handle kernel NULL pointer dereference at virtual address 00000004 [<c03a4678>] (clocksource_unbind) from [<c03a46d4>] (clocksource_unregister+0x2c/0x44) [<c03a46d4>] (clocksource_unregister) from [<c0a6f350>] (sun5i_rate_cb_clksrc+0x34/0x3c) [<c0a6f350>] (sun5i_rate_cb_clksrc) from [<c035ea50>] (notifier_call_chain+0x44/0x84) [<c035ea50>] (notifier_call_chain) from [<c035edc0>] (__srcu_notifier_call_chain+0x44/0x60) [<c035edc0>] (__srcu_notifier_call_chain) from [<c035edf4>] (srcu_notifier_call_chain+0x18/0x20) [<c035edf4>] (srcu_notifier_call_chain) from [<c0670174>] (__clk_notify+0x70/0x7c) [<c0670174>] (__clk_notify) from [<c06702c0>] (clk_propagate_rate_change+0xa4/0xc4) [<c06702c0>] (clk_propagate_rate_change) from [<c0670288>] (clk_propagate_rate_change+0x6c/0xc4) Revert the commit for now. clocksource_mmio_init can be made to pass back a pointer, but the code churn and usage of an inner struct might not be worth it. Fixes: 157dfade ("clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init") Reported-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NChen-Yu Tsai <wens@csie.org> Cc: linux-sunxi@googlegroups.com Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20161018054918.26855-1-wens@csie.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Rich Felker 提交于
At the hardware level, the J-Core PIT is integrated with the interrupt controller, but it is represented as its own device and has an independent programming interface. It provides a 12-bit countdown timer, which is not presently used, and a periodic timer. The interval length for the latter is programmable via a 32-bit throttle register whose units are determined by a bus-period register. The periodic timer is used to implement both periodic and oneshot clock event modes; in oneshot mode the interrupt handler simply disables the timer as soon as it fires. Despite its device tree node representing an interrupt for the PIT, the actual irq generated is programmable, not hard-wired. The driver is responsible for programming the PIT to generate the hardware irq number that the DT assigns to it. On SMP configurations, J-Core provides cpu-local instances of the PIT; no broadcast timer is needed. This driver supports the creation of the necessary per-cpu clock_event_device instances. A nanosecond-resolution clocksource is provided using the J-Core "RTC" registers, which give a 64-bit seconds count and 32-bit nanoseconds that wrap every second. The driver converts these to a full-range 32-bit nanoseconds count. Signed-off-by: NRich Felker <dalias@libc.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Link: http://lkml.kernel.org/r/b591ff12cc5ebf63d1edc98da26046f95a233814.1476393790.git.dalias@libc.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 20 10月, 2016 2 次提交
-
-
由 Marc Zyngier 提交于
It really looks bad without a newline. Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
-
由 Rich Felker 提交于
Core drivers for J-Core SoCs will be selected implicitly via CONFIG_SH_JCORE_SOC instead. Based on a corresponding change to the clocksource/timer driver requested by Daniel Lezcano. Signed-off-by: NRich Felker <dalias@libc.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-sh@vger.kernel.org Link: http://lkml.kernel.org/r/883a3d17084003e3cf21bab73ec12828fe4ff6c6.1476899495.git.dalias@libc.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-