- 05 6月, 2014 1 次提交
-
-
由 Laurent Pinchart 提交于
The pca954x driver recently switched to the GPIO descriptor API without including the correct <linux/gpio/consumer.h> header. This breaks compilation without CONFIG_GPIOLIB. drivers/i2c/muxes/i2c-mux-pca954x.c: In function ‘pca954x_probe’: drivers/i2c/muxes/i2c-mux-pca954x.c:204:2: error: implicit declaration of function ‘devm_gpiod_get’ [-Werror=implicit-function-declaration] gpio = devm_gpiod_get(&client->dev, "reset"); ^ drivers/i2c/muxes/i2c-mux-pca954x.c:204:7: warning: assignment makes pointer from integer without a cast [enabled by default] gpio = devm_gpiod_get(&client->dev, "reset"); ^ drivers/i2c/muxes/i2c-mux-pca954x.c:206:3: error: implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration] gpiod_direction_output(gpio, 0); ^ cc1: some warnings being treated as errors make[3]: *** [drivers/i2c/muxes/i2c-mux-pca954x.o] Error 1 Fix it by including the right header. Reported-by: NJim Davis <jim.epost@gmail.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 6月, 2014 12 次提交
-
-
由 Laurent Pinchart 提交于
The ID-based GPIO API pushes handling of GPIO polarity to drivers. Simplify the driver by switching to the descriptor-based GPIO API. This also fixes a mismatch between the pca954x DT bindings that document a "reset-gpios" property and the driver that requests a "reset-gpio" property. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Valentin Longchamp 提交于
The mpc_i2c_fixup function is called when the bus is not released by a slave. The function generates 9 pulses that should lead the slave to release the bus. The sequence that generates the pulses disables/enables the I2C module that controls the blocked bus. We have found out on the P2041 SoC that this could cause the CPU to hang (for a short delay). To avoid this, this patch introduces a read to the I2CDR register between the re-enablement of the I2C module in master mode and its returning to the slave mode instead of the delay (the final delay, between the pulses is kept), as proposed in procedure from the P2041 reference manual (16.6.2.3), and the other manuals from the mpc83xx and mpc85xx families. Signed-off-by: NRainer Boschung <rainer.boschung@keymile.com> Signed-off-by: NValentin Longchamp <valentin.longchamp@keymile.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sonic Zhang 提交于
No need to free managed resources any more. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Doug Anderson 提交于
On ARM Chromebooks we have a few devices that are accessed by both the AP (the main "Application Processor") and the EC (the Embedded Controller). These are: * The battery (sbs-battery). * The power management unit tps65090. On the original Samsung ARM Chromebook these devices were on an I2C bus that was shared between the AP and the EC and arbitrated using some extranal GPIOs (see i2c-arb-gpio-challenge). The original arbitration scheme worked well enough but had some downsides: * It was nonstandard (not using standard I2C multimaster) * It only worked if the EC-AP communication was I2C * It was relatively hard to debug problems (hard to tell if i2c issues were caused by the EC, the AP, or some device on the bus). On the HP Chromebook 11 the design was changed to: * The AP/EC comms were still i2c, but the battery/tps65090 were no longer on the bus used for AP/EC communication. The battery was exposed to the AP through a limited i2c tunnel and tps65090 was exposed to the AP through a custom Linux driver. On the Samsung ARM Chromebook 2 the scheme is changed yet again, now: * The AP/EC comms are now using SPI for faster speeds. * The EC's i2c bus is exposed to the AP through a full i2c tunnel. The upstream "tegra124-venice2" uses the same scheme as the Samsung ARM Chromebook 2, though it has a different set of components on the other side of the bus. This driver supports the scheme used by the Samsung ARM Chromebook 2. Future patches to this driver could add support for the battery tunnel on the HP Chromebook 11 (and perhaps could even be used to access tps65090 on the HP Chromebook 11 instead of using a special driver, but I haven't researched that enough). Signed-off-by: NVincent Palatin <vpalatin@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NDoug Anderson <dianders@chromium.org> Reviewed-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Jingoo Han 提交于
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NPeter Korsgaard <peter@korsgaard.com> Acked-by: NMaxime Coquelin <maxime.coquelin@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jingoo Han 提交于
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. For example, k.alloc and v.alloc failures use dump_stack(). Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NJean Delvare <jdelvare@suse.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NFelipe Balbi <balbi@ti.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
Intel Haswell has the same I2C host controller than Baytrail and it can also be enumerated as a PCI device. Add the PCI IDs to the driver list. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
It is possible that after entering runtime PM suspend the controller context is lost due the fact that its power is removed. This happens for example on Asus T100, an Intel Baytrail based tablet/laptop. In order to get the controller back to functional state, we need to implement runtime PM hooks which will re-initialize the hardware during runtime PM resume. We can re-use the existing system suspend hooks as the steps to resume/suspend the controller are the same. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
Userspace can initiate system suspend on arbitrary times which means that device drivers must make sure that their device gets quiesced before system suspend is entered. Therefore disable the I2C host controller in the driver system suspend hook. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Arnd said in another patch: "As far as I can tell, this driver must have produced this error for as long as it has been merged into the mainline kernel, but it was never part of the normal build tests: drivers/i2c/busses/i2c-nuc900.c: In function 'nuc900_i2c_probe': drivers/i2c/busses/i2c-nuc900.c:601:17: error: request for member 'apbfreq' in something not a structure or union ret = (i2c->clk.apbfreq)/(pdata->bus_freq * 5) - 1; ^ This is an attempt to get the driver to build and possibly work correctly, although I do wonder whether we should just remove it, as it has clearly never worked." I agree with removing it since nobody showed interest in Arnd's fixup patch. Reported-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: Wan ZongShun <mcuos.com@gmail.org> Acked-by: NArnd Bergmann <arnd@arndb.de>
-
由 Fugang Duan 提交于
Since IMX serial SOCs support low bus freq mode, some clocks freq may change to save power. I2C needs to check the clock source and update the divider. For example: i.MX6SL I2C clk is from IPG_PERCLK which is sourced from IPG_CLK. Under normal operation, IPG_CLK is 66MHz, ipg_perclk is at 22MHz. In low bus freq mode, IPG_CLK is at 12MHz and IPG_PERCLK is down to 4MHz. So the I2C driver must update the divider register for each transaction when the current IPG_PERCLK is not equal to the clock of previous transaction. Signed-off-by: NFugang Duan <B38611@freescale.com> [wsa: removed an outdated comment and simplified debug output] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fugang Duan 提交于
Test i2c device Maxim max44009, datasheet is located at: http://www.maximintegrated.com/datasheet/index.mvp/id/7175 The max44009 support repeat operation like: read -> repeat restart -> read/write The current i2c imx host controller driver don't support this operation that causes i2c bus hang due to "MTX" is cleared in .i2c_imx_read(). If "read" is the last message there have no problem, so the current driver supports all SMbus operation like: write -> repeat restart -> read/write IMX i2c controller for master receiver has some limitation: - If it is the last byte for one operation, it must generate STOP signal before read I2DR to prevent controller from generating another clock cycle. - If it is the last byte in the read, and then do repeat restart, it must set "MTX" before read I2DR to prevent controller from generating another extra clock cycle. The patch is to fix the issue. Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 02 6月, 2014 13 次提交
-
-
由 Wolfram Sang 提交于
Make clear that the driver is GPL v2 only. Remove FSF address. Remove filename in comment. Update copyright information. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Remove some obvious comments, remove some superfluous debug output (the error code carries the same information), some white space fixing... Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Status register and enable register are identical regarding their layout. Use the bit definitions for both. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The i2c core has per-adapter locks, so no need to protect again. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The old macros made it harder to see what was actually happening. Replace them with something more readable. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Setting up a read or write message is similar enough to be done in one function. Also, move a helper function into the new function since it is only used here. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We should always check if the bus is free, independently if it is a read or write. It should be done before the first message, though. After that, we ourselves keep the bus busy. Remove a 'ret' assignment which only silenced a build warning. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Remove the seperate functions and use designated constants. As readable but less overhead. Actually, this is even more readable since the old function used a mix of "=" and "|=". Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Remove the seperate functions and use designated constants. As readable but less overhead. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We use devm, so irq number is only needed during probe. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Very basic operations, just called once, can also go to the caller. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 5月, 2014 14 次提交
-
-
由 Jingoo Han 提交于
Use devm_gpio_request() to make cleanup paths simpler. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Reviewed-by: NVioleta Menendez <violeta.menendez@codethink.co.uk> Reviewed-by: NIan Molton <ian.molton@codethink.co.uk> Tested-by: NVioleta Menendez <violeta.menendez@codethink.co.uk> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jean Delvare 提交于
The i2c-eg20t driver is for a companion chip to the Intel Atom E600 series processors. These are 32-bit x86 processors so the driver is only needed on X86_32. Add COMPILE_TEST as an alternative, so that the driver can still be build-tested elsewhere. Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Newer SoCs have so fast input clocks that the ICCL/H registers only count every second clock to have a meaningful 9-bit range. The driver was already prepared for that happening, but didn't use it so far. Add the proper DT configuration for SoCs that need it. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Due to misconfiguration, it can happen that the calculated timing parameters are out of range. Bail out if that happens. We can also simplify some logic later because of the verified value. Also, make the printouts of the values more precise by adding the hex-prefixes. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
sh_mobile_i2c_init() could detect wrong settings, but didn't bail out, so it would continue unconfigured. Fix this. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Following the KISS principle, remove unneeded stuff. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
This is what devm was made for. No rollback mechanism needed, remove the hook parameter from the irq setup function and simplify it. While we are here change some variables to proper types. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Convert the easy parts to devm. irqs will be converted in a seperate patch to keep diffs readable. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Use standard i2c error codes for i2c failures. Also, don't print something on timeout since it happens regularly with i2c. Simplify some, logic, too. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
No functional change, binaries are identical. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Naveen Krishna Ch 提交于
HSI2C module on Exynos5260 differs from current modules in following ways: 1. HSI2C on Exynos5260 has fifo_depth of 16bytes 2. Module needs to be reset as a part of init sequence. Hence, Following changes are involved. 1. Add a new compatible string and Updates the Documentation dt bindings. 2. Introduce a variant struct to support the changes in H/W 3. Reset the module during init. Thus, bringing the module back to default state irrespective of what firmware did with it. Signed-off-by: NNaveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: NPankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Richard Leitner 提交于
Fixed most checkpatch.pl issues Signed-off-by: NRichard Leitner <me@g0hl1n.net> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ulf Hansson 提交于
For !CONFIG_PM_RUNTIME, the device were never put back into active state while resuming. For CONFIG_PM_RUNTIME, we blindly trusted the device to be inactive while we were about to handle it at suspend late, which is just too optimistic. Even if the driver uses pm_runtime_put_sync() after each tranfer to return it's runtime PM resources, there are no guarantees this will actually mean the device will inactivated. The reason is that the PM core will prevent runtime suspend during system suspend, and thus when a transfer occurs during the early phases of system suspend the device will be kept active after the transfer. To handle both issues above, use pm_runtime_force_suspend|resume() from the system suspend|resume callbacks. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-