- 03 7月, 2017 8 次提交
-
-
由 Jan Kiszka 提交于
This implements the setup of RS232 and the switch-over to RS485 or RS422 for the Siemens IOT2040. That uses an EXAR XR17V352 with external logic to switch between the different modes. The external logic is controlled via MPIO pins of the EXAR controller. Only pin 10 can be exported as GPIO on the IOT2040. It is connected to an LED. As the XR17V352 used on the IOT2040 is not equipped with an external EEPROM, it cannot present itself as IOT2040-variant via subvendor/ subdevice IDs. Thus, we have to check via DMI for the target platform. Co-developed with Sascha Weisenberger. Signed-off-by: NSascha Weisenberger <sascha.weisenberger@siemens.com> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kiszka 提交于
On the SIMATIC, IOT2040 only a single pin is exportable as GPIO, the rest is required to operate the UART. To allow modeling this case, expand the platform device data structure to specify a (consecutive) pin subset for exporting by the gpio-exar driver. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
-
由 Jan Kiszka 提交于
Aligns us with device_add_properties, the function we call. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
-
由 Jan Kiszka 提交于
This prepares the addition of IOT2040 platform support by preparing the needed setup and rs485_config hooks. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kiszka 提交于
Set the parent of the exar gpiochip to its platform device, like other gpiochips are doing it. In order to keep the relationship discoverable for ACPI systems, set the platform device companion to the PCI device. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jan Kiszka 提交于
The UART driver already maps the resource for us. Trying to do this here only fails and leaves us with a non-working device. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jan Kiszka 提交于
Commtech adapters need the MPIOs for internal purposes, and the gpio-exar driver already refused to pick them up. But there is actually no point in even creating the underlying platform device. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kiszka 提交于
The Siemens IOT2040 comes with a RS485 interface that allows to enable or disable bus termination via software. Add a bit to the flags field of serial_rs485 that applications can set in order to request this feature from the hardware. This seems generic enough to add it for everyone. Existing driver will simply ignore it when set. Signed-off-by: NSascha Weisenberger <sascha.weisenberger@siemens.com> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 29 6月, 2017 2 次提交
-
-
由 Biju Das 提交于
Renesas RZ/G1M (R8A7743) SoC GPIO blocks are identical to the R-Car Gen2 family. Add support for its GPIO controllers. Signed-off-by: NBiju Das <biju.das@bp.renesas.com> Reviewed-by: NChris Paterson <chris.paterson2@renesas.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
According to Whiskey Cove PMIC GPIO controller specification, for GPIO pins 0-12, GPIO input and output register control address range from, 0x4e44-0x4e50 for GPIO outputs control register 0x4e51-0x4e5d for GPIO input control register But, currently when calculating the GPIO register offsets in to_reg() function, all GPIO pins in the same bank uses the same GPIO control register address. This logic is incorrect. This patch fixes this issue. This patch also adds support to selectively skip register modification for virtual GPIOs. In case of Whiskey Cove PMIC, ACPI code may use up 94 virtual GPIOs. These virtual GPIOs are used by the ACPI code as means to access various non GPIO bits of PMIC. So for these virtual GPIOs, we don't need to manipulate the physical GPIO pin register. A similar patch has been merged recently by Hans for Crystal Cove PMIC GPIO driver. You can find more details about it in Commit 9a752b4c ("gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs") Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reported-by: NJukka Laitinen <jukka.laitinen@intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 21 6月, 2017 2 次提交
-
-
由 Keerthy 提交于
Add driver for lp87565 PMIC family GPIOs. Three GPIOs are supported and can be configured in Open-drain output or Push-pull output. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Xiaoguang Chen 提交于
dwapb_irq_set_type overwrites polarity register value for IRQ_TYPE_EDGE_BOTH case. If the polarity of one gpio is 0 by default, then it will set falling edge irq trigger. and the gpio may requires rising edge irq for the first time, and it will be missed. Do not overwrite polarity register for IRQ_TYPE_EDGE_BOTH case can solve this issue. Signed-off-by: NXiaoguang Chen <xgchenshy@gmail.com> Tested-by: NJisheng Zhang <jszhang@marvell.com> [Fix some really weird text encoding problem] Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 20 6月, 2017 12 次提交
-
-
由 Andy Shevchenko 提交于
We will help Linus to maintain GPIO ACPI support. Append a dedicated record to the MAINTAINERS data base. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jan Kiszka 提交于
First, the logic for translating a register bit to the return code of exar_get_direction and exar_get_value were wrong. And second, there was a flip regarding the register bank in exar_get_direction. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jan Kiszka 提交于
Do not allocate resources on behalf of the parent device but on our own. Otherwise, cleanup does not properly work if gpio-exar is removed but not the parent device. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jan Kiszka 提交于
This fixes reloading of the GPIO driver for the same platform device instance as created by the exar UART driver: First of all, the driver sets drvdata to its own value during probing and does not restore the original value on exit. But this won't help anyway as the core clears drvdata after the driver left. Set the platform device parent instead. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
When allocating a zeroed array of objects use devm_kcalloc() instead of manually calculating the required size and using devm_kzalloc(). Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Just taking credit for the recent changes and new features. :) Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Indicate the error number and make the message a bit more elaborate. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
When the requested number of GPIO lines is 0, return -EINVAL, not -1 which is -EPERM. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
We currently shift bits here and there without actually explaining what we're doing. Add some helper variables with names indicating their purpose to improve the code readability. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Currently we ignore the last odd range value, since each chip is described by two values. Be more strict and require the user to pass an even number of ranges. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Invert the logic of the irq_enabled check and only access the private data after the input is sanitized. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
We're currently only checking the first character of the input to the debugfs event files, so a string like '0sdfdsf' is valid and indicates a falling edge event. Be more strict and only allow '0', '1', '0\n' & '1\n'. While we're at it: move the sanitization code before the irq_enabled check so that we indicate an error on invalid input even if nobody is waiting for events. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 16 6月, 2017 6 次提交
-
-
由 Gregory CLEMENT 提交于
The Armada 7K and 8K SoCs use the same gpio controller as most of the other mvebu SoCs. However, the main difference is that the GPIO controller is part of a bigger system controller, and a syscon is used to control the overall system controller. Therefore, the driver needs to be adjusted to retrieve the regmap of the syscon to access registers, and account for the fact that registers are located at a certain offset within the regmap. This commit add the support of the syscon and introduce a new variant for this case. It was based on the preliminary work of Thomas Petazzoni. Tested-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Gregory CLEMENT 提交于
In some place in the driver regmap_update_bits was misused. Indeed the last argument is not the value of the bit (or group of bits) itself but the mask value inside the register. So when setting the bit N, then the value must be BIT(N) and not 1. CC: Ralph Sennhauser <ralph.sennhauser@gmail.com> Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Reviewed-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: NRalph Sennhauser <ralph.sennhauser@gmail.com> Tested-by: NChris Packham <Chris.Packham@alliedtelesis.co.nz> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Soren Brinkmann 提交于
The one quirk used in the zynq GPIO driver was called FOO which is not very descriptive. Rename the quirk to IS_ZYNQ as it indicates whether the HW is a zynq or zynqmp device to allow handling of device-specific differences of the HW. Also provide a helper function to test whether the HW is zynq or zynqmp. Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Keerthy 提交于
Add an entry for the gpio-davinci driver and add myself as a maintainer for the same. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
I don't remember how linux/gpio.h made the source, now it seems unused. Remove it. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 31 5月, 2017 2 次提交
-
-
由 Arnd Bergmann 提交于
Without the regmap code, we get a link error: drivers/gpio/built-in.o: In function `xra1403_probe': (.text+0x132e0): undefined reference to `__devm_regmap_init_spi' Fixes: 5704520d ("gpio: xra1403: Add EXAR XRA1403 SPI GPIO expander driver") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NNandor Han <nandor.han@ge.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Arnd Bergmann 提交于
This was left behind by a cleanup patch: drivers/gpio/gpiolib.c: In function 'gpiochip_irqchip_init_valid_mask': drivers/gpio/gpiolib.c:1474:6: error: unused variable 'i' [-Werror=unused-variable] Fixes: 923a654c ("gpiolib: Re-use bitmap_fill() instead of open coded loop") Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Reported-by: NColin King <colin.king@canonical.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 29 5月, 2017 8 次提交
-
-
由 Wolfram Sang 提交于
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
This function can fail, so check the return value before dereferencing the returned pointer. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Even though this is a testing module, be nice and actually implement these functions. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
When inserting and removing the module repeatedly (e.g. when running the libgpiod test-suite) the kernel log gets clobbered with messages reporting successful creation of dummy gpiochips. Remove this message and only emit logs when something bad happens. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
All internal symbols except for the direction enum follow the same convention and use the gpio_mockup prefix. Add the prefix to the DIR_IN and DIR_OUT definitions as well for consistency across the file. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
The comment in linux/gpio/driver.h says: @get_direction: returns direction for signal "offset", 0=out, 1=in We got those switched at some point. Fix the values. Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-