mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Merge "Merge b86406d42a ("Merge tag 'i2c-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux") into android-mainline" into android-mainline
This commit is contained in:
@@ -23,6 +23,7 @@ properties:
|
||||
- fsl,imx8dxl-lpi2c
|
||||
- fsl,imx8qm-lpi2c
|
||||
- fsl,imx8ulp-lpi2c
|
||||
- fsl,imx93-lpi2c
|
||||
- const: fsl,imx7ulp-lpi2c
|
||||
|
||||
reg:
|
||||
@@ -37,10 +38,22 @@ properties:
|
||||
clock-frequency: true
|
||||
|
||||
clock-names:
|
||||
maxItems: 1
|
||||
items:
|
||||
- const: per
|
||||
- const: ipg
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
maxItems: 2
|
||||
|
||||
dmas:
|
||||
items:
|
||||
- description: DMA controller phandle and request line for TX
|
||||
- description: DMA controller phandle and request line for RX
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: tx
|
||||
- const: rx
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
@@ -63,5 +76,6 @@ examples:
|
||||
reg = <0x40A50000 0x10000>;
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX7ULP_CLK_LPI2C7>;
|
||||
clocks = <&clks IMX7ULP_CLK_LPI2C7>,
|
||||
<&clks IMX7ULP_CLK_NIC1_BUS_DIV>;
|
||||
};
|
||||
|
||||
@@ -18,6 +18,17 @@ properties:
|
||||
- const: fsl,imx1-i2c
|
||||
- const: fsl,imx21-i2c
|
||||
- const: fsl,vf610-i2c
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,ls1012a-i2c
|
||||
- fsl,ls1021a-i2c
|
||||
- fsl,ls1028a-i2c
|
||||
- fsl,ls1043a-i2c
|
||||
- fsl,ls1046a-i2c
|
||||
- fsl,ls1088a-i2c
|
||||
- fsl,ls208xa-i2c
|
||||
- fsl,lx2160a-i2c
|
||||
- const: fsl,vf610-i2c
|
||||
- items:
|
||||
- const: fsl,imx35-i2c
|
||||
- const: fsl,imx1-i2c
|
||||
|
||||
@@ -29,6 +29,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3036-i2c
|
||||
- rockchip,rk3128-i2c
|
||||
- rockchip,rk3368-i2c
|
||||
- const: rockchip,rk3288-i2c
|
||||
- items:
|
||||
|
||||
@@ -66,6 +66,19 @@ properties:
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
dmas:
|
||||
items:
|
||||
- description: RX DMA Channel
|
||||
- description: TX DMA Channel
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: rx
|
||||
- const: tx
|
||||
|
||||
dependencies:
|
||||
dmas: [ dma-names ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/i2c/mellanox,i2c-mlxbf.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Mellanox I2C SMBus on BlueField SoCs
|
||||
|
||||
maintainers:
|
||||
- Khalil Blaiech <kblaiech@nvidia.com>
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/i2c/i2c-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mellanox,i2c-mlxbf1
|
||||
- mellanox,i2c-mlxbf2
|
||||
|
||||
reg:
|
||||
minItems: 3
|
||||
items:
|
||||
- description: Smbus block registers
|
||||
- description: Cause master registers
|
||||
- description: Cause slave registers
|
||||
- description: Cause coalesce registers
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clock-frequency:
|
||||
enum: [ 100000, 400000, 1000000 ]
|
||||
description:
|
||||
bus frequency used to configure timing registers;
|
||||
The frequency is expressed in Hz. Default is 100000.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- mellanox,i2c-mlxbf1
|
||||
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 3
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c@2804000 {
|
||||
compatible = "mellanox,i2c-mlxbf1";
|
||||
reg = <0x02804000 0x800>,
|
||||
<0x02801200 0x020>,
|
||||
<0x02801260 0x020>;
|
||||
interrupts = <57>;
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
- |
|
||||
i2c@2808800 {
|
||||
compatible = "mellanox,i2c-mlxbf2";
|
||||
reg = <0x02808800 0x600>,
|
||||
<0x02808e00 0x020>,
|
||||
<0x02808e20 0x020>,
|
||||
<0x02808e40 0x010>;
|
||||
interrupts = <57>;
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
@@ -126,6 +126,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8250-cci
|
||||
- qcom,sm8450-cci
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
|
||||
@@ -52,6 +52,7 @@ properties:
|
||||
- enum:
|
||||
- renesas,i2c-r8a779a0 # R-Car V3U
|
||||
- renesas,i2c-r8a779f0 # R-Car S4-8
|
||||
- renesas,i2c-r8a779g0 # R-Car V4H
|
||||
- const: renesas,rcar-gen4-i2c # R-Car Gen4
|
||||
|
||||
reg:
|
||||
|
||||
@@ -72,12 +72,15 @@ Event types:
|
||||
|
||||
'val': unused
|
||||
|
||||
'ret': always 0
|
||||
'ret': 0 if the backend is ready, otherwise some errno
|
||||
|
||||
Another I2C master wants to write data to us. This event should be sent once
|
||||
our own address and the write bit was detected. The data did not arrive yet, so
|
||||
there is nothing to process or return. Wakeup or initialization probably needs
|
||||
to be done, though.
|
||||
there is nothing to process or return. After returning, the bus driver must
|
||||
always ack the address phase. If 'ret' is zero, backend initialization or
|
||||
wakeup is done and further data may be received. If 'ret' is an errno, the bus
|
||||
driver should nack all incoming bytes until the next stop condition to enforce
|
||||
a retry of the transmission.
|
||||
|
||||
* I2C_SLAVE_READ_REQUESTED (mandatory)
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ those devices, and a remove() method to unbind.
|
||||
::
|
||||
|
||||
static int foo_probe(struct i2c_client *client);
|
||||
static int foo_remove(struct i2c_client *client);
|
||||
static void foo_remove(struct i2c_client *client);
|
||||
|
||||
Remember that the i2c_driver does not create those client handles. The
|
||||
handle may be used during foo_probe(). If foo_probe() reports success
|
||||
|
||||
10
MAINTAINERS
10
MAINTAINERS
@@ -12989,9 +12989,9 @@ F: drivers/input/touchscreen/melfas_mip4.c
|
||||
|
||||
MELLANOX BLUEFIELD I2C DRIVER
|
||||
M: Khalil Blaiech <kblaiech@nvidia.com>
|
||||
M: Asmaa Mnebhi <asmaa@nvidia.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
|
||||
F: drivers/i2c/busses/i2c-mlxbf.c
|
||||
|
||||
MELLANOX ETHERNET DRIVER (mlx4_en)
|
||||
@@ -13440,6 +13440,14 @@ F: Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml
|
||||
F: drivers/nvmem/microchip-otpc.c
|
||||
F: include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
|
||||
|
||||
MICROCHIP PCI1XXXX I2C DRIVER
|
||||
M: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
|
||||
M: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
|
||||
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/i2c/busses/i2c-mchp-pci1xxxx.c
|
||||
|
||||
MICROCHIP PWM DRIVER
|
||||
M: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
|
||||
@@ -516,8 +516,8 @@ exp_setup_sela_fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int da850_evm_ui_expander_teardown(struct i2c_client *client,
|
||||
unsigned gpio, unsigned ngpio, void *c)
|
||||
static void da850_evm_ui_expander_teardown(struct i2c_client *client,
|
||||
unsigned gpio, unsigned ngpio, void *c)
|
||||
{
|
||||
platform_device_unregister(&da850_evm_ui_keys_device);
|
||||
|
||||
@@ -529,8 +529,6 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
|
||||
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_C);
|
||||
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_B);
|
||||
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_A);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* assign the baseboard expander's GPIOs after the UI board's */
|
||||
@@ -697,13 +695,11 @@ io_exp_setup_sw_fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int da850_evm_bb_expander_teardown(struct i2c_client *client,
|
||||
unsigned gpio, unsigned ngpio, void *c)
|
||||
static void da850_evm_bb_expander_teardown(struct i2c_client *client,
|
||||
unsigned gpio, unsigned ngpio, void *c)
|
||||
{
|
||||
platform_device_unregister(&da850_evm_bb_leds_device);
|
||||
platform_device_unregister(&da850_evm_bb_keys_device);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pca953x_platform_data da850_evm_ui_expander_info = {
|
||||
|
||||
@@ -178,7 +178,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mcu_remove(struct i2c_client *client)
|
||||
static void mcu_remove(struct i2c_client *client)
|
||||
{
|
||||
struct mcu *mcu = i2c_get_clientdata(client);
|
||||
|
||||
@@ -193,7 +193,6 @@ static int mcu_remove(struct i2c_client *client)
|
||||
|
||||
mcu_gpiochip_remove(mcu);
|
||||
kfree(mcu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id mcu_ids[] = {
|
||||
|
||||
@@ -775,7 +775,7 @@ static int ht16k33_probe(struct i2c_client *client)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ht16k33_remove(struct i2c_client *client)
|
||||
static void ht16k33_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ht16k33_priv *priv = i2c_get_clientdata(client);
|
||||
struct ht16k33_fbdev *fbdev = &priv->fbdev;
|
||||
@@ -796,8 +796,6 @@ static int ht16k33_remove(struct i2c_client *client)
|
||||
device_remove_file(&client->dev, &dev_attr_map_seg14);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ht16k33_i2c_match[] = {
|
||||
|
||||
@@ -340,13 +340,12 @@ fail1:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int lcd2s_i2c_remove(struct i2c_client *i2c)
|
||||
static void lcd2s_i2c_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct lcd2s_data *lcd2s = i2c_get_clientdata(i2c);
|
||||
|
||||
charlcd_unregister(lcd2s->charlcd);
|
||||
charlcd_free(lcd2s->charlcd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id lcd2s_i2c_id[] = {
|
||||
|
||||
@@ -341,14 +341,12 @@ static int ipmb_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ipmb_remove(struct i2c_client *client)
|
||||
static void ipmb_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ipmb_dev *ipmb_dev = i2c_get_clientdata(client);
|
||||
|
||||
i2c_slave_unregister(client);
|
||||
misc_deregister(&ipmb_dev->miscdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ipmb_id[] = {
|
||||
|
||||
@@ -424,7 +424,7 @@ static void ipmi_ipmb_request_events(void *send_info)
|
||||
/* We don't fetch events here. */
|
||||
}
|
||||
|
||||
static int ipmi_ipmb_remove(struct i2c_client *client)
|
||||
static void ipmi_ipmb_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ipmi_ipmb_dev *iidev = i2c_get_clientdata(client);
|
||||
|
||||
@@ -438,8 +438,6 @@ static int ipmi_ipmb_remove(struct i2c_client *client)
|
||||
ipmi_ipmb_stop_thread(iidev);
|
||||
|
||||
ipmi_unregister_smi(iidev->intf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ipmi_ipmb_probe(struct i2c_client *client)
|
||||
|
||||
@@ -1281,13 +1281,13 @@ static void shutdown_ssif(void *send_info)
|
||||
}
|
||||
}
|
||||
|
||||
static int ssif_remove(struct i2c_client *client)
|
||||
static void ssif_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ssif_info *ssif_info = i2c_get_clientdata(client);
|
||||
struct ssif_addr_info *addr_info;
|
||||
|
||||
if (!ssif_info)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
/*
|
||||
* After this point, we won't deliver anything asychronously
|
||||
@@ -1303,8 +1303,6 @@ static int ssif_remove(struct i2c_client *client)
|
||||
}
|
||||
|
||||
kfree(ssif_info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int read_response(struct i2c_client *client, unsigned char *resp)
|
||||
|
||||
@@ -264,13 +264,11 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
|
||||
* @param: client, the i2c_client description (TPM I2C description).
|
||||
* @return: 0 in case of success.
|
||||
*/
|
||||
static int st33zp24_i2c_remove(struct i2c_client *client)
|
||||
static void st33zp24_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = i2c_get_clientdata(client);
|
||||
|
||||
st33zp24_remove(chip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id st33zp24_i2c_id[] = {
|
||||
|
||||
@@ -179,12 +179,11 @@ static int i2c_atmel_probe(struct i2c_client *client,
|
||||
return tpm_chip_register(chip);
|
||||
}
|
||||
|
||||
static int i2c_atmel_remove(struct i2c_client *client)
|
||||
static void i2c_atmel_remove(struct i2c_client *client)
|
||||
{
|
||||
struct device *dev = &(client->dev);
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
tpm_chip_unregister(chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id i2c_atmel_id[] = {
|
||||
|
||||
@@ -706,15 +706,13 @@ static int tpm_tis_i2c_probe(struct i2c_client *client,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int tpm_tis_i2c_remove(struct i2c_client *client)
|
||||
static void tpm_tis_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = tpm_dev.chip;
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
release_locality(chip, tpm_dev.locality, 1);
|
||||
tpm_dev.client = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_driver tpm_tis_i2c_driver = {
|
||||
|
||||
@@ -622,12 +622,11 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
|
||||
return tpm_chip_register(chip);
|
||||
}
|
||||
|
||||
static int i2c_nuvoton_remove(struct i2c_client *client)
|
||||
static void i2c_nuvoton_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = i2c_get_clientdata(client);
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id i2c_nuvoton_id[] = {
|
||||
|
||||
@@ -351,13 +351,12 @@ static int tpm_tis_i2c_probe(struct i2c_client *dev,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static int tpm_tis_i2c_remove(struct i2c_client *client)
|
||||
static void tpm_tis_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = i2c_get_clientdata(client);
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
tpm_tis_remove(chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tpm_tis_i2c_id[] = {
|
||||
|
||||
@@ -763,20 +763,18 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
|
||||
* - 0: Success.
|
||||
* - -errno: A POSIX error code.
|
||||
*/
|
||||
static int tpm_cr50_i2c_remove(struct i2c_client *client)
|
||||
static void tpm_cr50_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = i2c_get_clientdata(client);
|
||||
struct device *dev = &client->dev;
|
||||
|
||||
if (!chip) {
|
||||
dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
tpm_cr50_release_locality(chip, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);
|
||||
|
||||
@@ -665,10 +665,9 @@ static int cdce706_probe(struct i2c_client *client)
|
||||
cdce);
|
||||
}
|
||||
|
||||
static int cdce706_remove(struct i2c_client *client)
|
||||
static void cdce706_remove(struct i2c_client *client)
|
||||
{
|
||||
of_clk_del_provider(client->dev.of_node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@ static int cs2000_version_print(struct cs2000_priv *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs2000_remove(struct i2c_client *client)
|
||||
static void cs2000_remove(struct i2c_client *client)
|
||||
{
|
||||
struct cs2000_priv *priv = i2c_get_clientdata(client);
|
||||
struct device *dev = priv_to_dev(priv);
|
||||
@@ -566,8 +566,6 @@ static int cs2000_remove(struct i2c_client *client)
|
||||
of_clk_del_provider(np);
|
||||
|
||||
clk_hw_unregister(&priv->hw);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cs2000_probe(struct i2c_client *client)
|
||||
|
||||
@@ -370,10 +370,9 @@ static int si514_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int si514_remove(struct i2c_client *client)
|
||||
static void si514_remove(struct i2c_client *client)
|
||||
{
|
||||
of_clk_del_provider(client->dev.of_node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id si514_id[] = {
|
||||
|
||||
@@ -1796,7 +1796,7 @@ cleanup:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int si5341_remove(struct i2c_client *client)
|
||||
static void si5341_remove(struct i2c_client *client)
|
||||
{
|
||||
struct clk_si5341 *data = i2c_get_clientdata(client);
|
||||
int i;
|
||||
@@ -1807,8 +1807,6 @@ static int si5341_remove(struct i2c_client *client)
|
||||
if (data->clk[i].vddo_reg)
|
||||
regulator_disable(data->clk[i].vddo_reg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id si5341_id[] = {
|
||||
|
||||
@@ -1651,11 +1651,9 @@ static int si5351_i2c_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int si5351_i2c_remove(struct i2c_client *client)
|
||||
static void si5351_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
of_clk_del_provider(client->dev.of_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_driver si5351_driver = {
|
||||
|
||||
@@ -498,10 +498,9 @@ static int si570_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int si570_remove(struct i2c_client *client)
|
||||
static void si570_remove(struct i2c_client *client)
|
||||
{
|
||||
of_clk_del_provider(client->dev.of_node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id clk_si570_of_match[] = {
|
||||
|
||||
@@ -1138,7 +1138,7 @@ err_clk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int vc5_remove(struct i2c_client *client)
|
||||
static void vc5_remove(struct i2c_client *client)
|
||||
{
|
||||
struct vc5_driver_data *vc5 = i2c_get_clientdata(client);
|
||||
|
||||
@@ -1146,8 +1146,6 @@ static int vc5_remove(struct i2c_client *client)
|
||||
|
||||
if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL)
|
||||
clk_unregister_fixed_rate(vc5->pin_xin);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused vc5_suspend(struct device *dev)
|
||||
|
||||
@@ -343,7 +343,7 @@ static int atmel_ecc_probe(struct i2c_client *client,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int atmel_ecc_remove(struct i2c_client *client)
|
||||
static void atmel_ecc_remove(struct i2c_client *client)
|
||||
{
|
||||
struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
|
||||
|
||||
@@ -358,7 +358,7 @@ static int atmel_ecc_remove(struct i2c_client *client)
|
||||
* accessing the freed memory.
|
||||
*/
|
||||
dev_emerg(&client->dev, "Device is busy, expect memory corruption.\n");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
crypto_unregister_kpp(&atmel_ecdh_nist_p256);
|
||||
@@ -366,8 +366,6 @@ static int atmel_ecc_remove(struct i2c_client *client)
|
||||
spin_lock(&driver_data.i2c_list_lock);
|
||||
list_del(&i2c_priv->i2c_client_list_node);
|
||||
spin_unlock(&driver_data.i2c_list_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
@@ -116,18 +116,16 @@ static int atmel_sha204a_probe(struct i2c_client *client,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int atmel_sha204a_remove(struct i2c_client *client)
|
||||
static void atmel_sha204a_remove(struct i2c_client *client)
|
||||
{
|
||||
struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
|
||||
|
||||
if (atomic_read(&i2c_priv->tfm_count)) {
|
||||
dev_emerg(&client->dev, "Device is busy, will remove it anyhow\n");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
kfree((void *)i2c_priv->hwrng.priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id atmel_sha204a_dt_ids[] = {
|
||||
|
||||
@@ -646,13 +646,11 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rt8973a_muic_i2c_remove(struct i2c_client *i2c)
|
||||
static void rt8973a_muic_i2c_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct rt8973a_muic_info *info = i2c_get_clientdata(i2c);
|
||||
|
||||
regmap_del_irq_chip(info->irq, info->irq_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id rt8973a_dt_match[] = {
|
||||
|
||||
@@ -409,14 +409,12 @@ static int adp5588_gpio_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adp5588_gpio_remove(struct i2c_client *client)
|
||||
static void adp5588_gpio_remove(struct i2c_client *client)
|
||||
{
|
||||
struct adp5588_gpio *dev = i2c_get_clientdata(client);
|
||||
|
||||
if (dev->client->irq)
|
||||
free_irq(dev->client->irq, dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adp5588_gpio_id[] = {
|
||||
|
||||
@@ -48,11 +48,9 @@ static int max7300_probe(struct i2c_client *client,
|
||||
return __max730x_probe(ts);
|
||||
}
|
||||
|
||||
static int max7300_remove(struct i2c_client *client)
|
||||
static void max7300_remove(struct i2c_client *client)
|
||||
{
|
||||
__max730x_remove(&client->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id max7300_id[] = {
|
||||
|
||||
@@ -1101,24 +1101,17 @@ err_exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pca953x_remove(struct i2c_client *client)
|
||||
static void pca953x_remove(struct i2c_client *client)
|
||||
{
|
||||
struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct pca953x_chip *chip = i2c_get_clientdata(client);
|
||||
int ret;
|
||||
|
||||
if (pdata && pdata->teardown) {
|
||||
ret = pdata->teardown(client, chip->gpio_chip.base,
|
||||
chip->gpio_chip.ngpio, pdata->context);
|
||||
if (ret < 0)
|
||||
dev_err(&client->dev, "teardown failed, %d\n", ret);
|
||||
} else {
|
||||
ret = 0;
|
||||
pdata->teardown(client, chip->gpio_chip.base,
|
||||
chip->gpio_chip.ngpio, pdata->context);
|
||||
}
|
||||
|
||||
regulator_disable(chip->regulator);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
@@ -399,7 +399,7 @@ fail:
|
||||
return status;
|
||||
}
|
||||
|
||||
static int pcf857x_remove(struct i2c_client *client)
|
||||
static void pcf857x_remove(struct i2c_client *client)
|
||||
{
|
||||
struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct pcf857x *gpio = i2c_get_clientdata(client);
|
||||
@@ -407,8 +407,6 @@ static int pcf857x_remove(struct i2c_client *client)
|
||||
if (pdata && pdata->teardown)
|
||||
pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio,
|
||||
pdata->context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pcf857x_shutdown(struct i2c_client *client)
|
||||
|
||||
@@ -126,13 +126,11 @@ static int tpic2810_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tpic2810_remove(struct i2c_client *client)
|
||||
static void tpic2810_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpic2810 *gpio = i2c_get_clientdata(client);
|
||||
|
||||
gpiochip_remove(&gpio->chip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tpic2810_id_table[] = {
|
||||
|
||||
@@ -1336,7 +1336,7 @@ uninit_regulators:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int adv7511_remove(struct i2c_client *i2c)
|
||||
static void adv7511_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct adv7511 *adv7511 = i2c_get_clientdata(i2c);
|
||||
|
||||
@@ -1353,8 +1353,6 @@ static int adv7511_remove(struct i2c_client *i2c)
|
||||
|
||||
i2c_unregister_device(adv7511->i2c_packet);
|
||||
i2c_unregister_device(adv7511->i2c_edid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adv7511_i2c_ids[] = {
|
||||
|
||||
@@ -787,7 +787,7 @@ err_unregister_i2c:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int anx6345_i2c_remove(struct i2c_client *client)
|
||||
static void anx6345_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct anx6345 *anx6345 = i2c_get_clientdata(client);
|
||||
|
||||
@@ -798,8 +798,6 @@ static int anx6345_i2c_remove(struct i2c_client *client)
|
||||
kfree(anx6345->edid);
|
||||
|
||||
mutex_destroy(&anx6345->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id anx6345_id[] = {
|
||||
|
||||
@@ -1357,7 +1357,7 @@ err_unregister_i2c:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int anx78xx_i2c_remove(struct i2c_client *client)
|
||||
static void anx78xx_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct anx78xx *anx78xx = i2c_get_clientdata(client);
|
||||
|
||||
@@ -1366,8 +1366,6 @@ static int anx78xx_i2c_remove(struct i2c_client *client)
|
||||
unregister_i2c_dummy_clients(anx78xx);
|
||||
|
||||
kfree(anx78xx->edid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id anx78xx_id[] = {
|
||||
|
||||
@@ -2689,7 +2689,7 @@ free_hdcp_wq:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int anx7625_i2c_remove(struct i2c_client *client)
|
||||
static void anx7625_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct anx7625_data *platform = i2c_get_clientdata(client);
|
||||
|
||||
@@ -2709,8 +2709,6 @@ static int anx7625_i2c_remove(struct i2c_client *client)
|
||||
|
||||
if (platform->pdata.audio_en)
|
||||
anx7625_unregister_audio(platform);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id anx7625_id[] = {
|
||||
|
||||
@@ -583,14 +583,12 @@ static int ch7033_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ch7033_remove(struct i2c_client *client)
|
||||
static void ch7033_remove(struct i2c_client *client)
|
||||
{
|
||||
struct device *dev = &client->dev;
|
||||
struct ch7033_priv *priv = dev_get_drvdata(dev);
|
||||
|
||||
drm_bridge_remove(&priv->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ch7033_dt_ids[] = {
|
||||
|
||||
@@ -159,13 +159,11 @@ static int cros_ec_anx7688_bridge_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cros_ec_anx7688_bridge_remove(struct i2c_client *client)
|
||||
static void cros_ec_anx7688_bridge_remove(struct i2c_client *client)
|
||||
{
|
||||
struct cros_ec_anx7688 *anx7688 = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&anx7688->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id cros_ec_anx7688_bridge_match_table[] = {
|
||||
|
||||
@@ -3316,7 +3316,7 @@ static int it6505_i2c_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int it6505_i2c_remove(struct i2c_client *client)
|
||||
static void it6505_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct it6505 *it6505 = i2c_get_clientdata(client);
|
||||
|
||||
@@ -3324,8 +3324,6 @@ static int it6505_i2c_remove(struct i2c_client *client)
|
||||
drm_dp_aux_unregister(&it6505->aux);
|
||||
it6505_debugfs_remove(it6505);
|
||||
it6505_poweroff(it6505);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id it6505_id[] = {
|
||||
|
||||
@@ -1623,15 +1623,13 @@ static int it66121_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int it66121_remove(struct i2c_client *client)
|
||||
static void it66121_remove(struct i2c_client *client)
|
||||
{
|
||||
struct it66121_ctx *ctx = i2c_get_clientdata(client);
|
||||
|
||||
ite66121_power_off(ctx);
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
mutex_destroy(&ctx->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id it66121_dt_match[] = {
|
||||
|
||||
@@ -723,7 +723,7 @@ err_dt_parse:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lt8912_remove(struct i2c_client *client)
|
||||
static void lt8912_remove(struct i2c_client *client)
|
||||
{
|
||||
struct lt8912 *lt = i2c_get_clientdata(client);
|
||||
|
||||
@@ -731,7 +731,6 @@ static int lt8912_remove(struct i2c_client *client)
|
||||
drm_bridge_remove(<->bridge);
|
||||
lt8912_free_i2c(lt);
|
||||
lt8912_put_dt(lt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id lt8912_dt_match[] = {
|
||||
|
||||
@@ -766,13 +766,11 @@ static int lt9211_probe(struct i2c_client *client,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lt9211_remove(struct i2c_client *client)
|
||||
static void lt9211_remove(struct i2c_client *client)
|
||||
{
|
||||
struct lt9211 *ctx = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id lt9211_id[] = {
|
||||
|
||||
@@ -1216,7 +1216,7 @@ err_of_put:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lt9611_remove(struct i2c_client *client)
|
||||
static void lt9611_remove(struct i2c_client *client)
|
||||
{
|
||||
struct lt9611 *lt9611 = i2c_get_clientdata(client);
|
||||
|
||||
@@ -1228,8 +1228,6 @@ static int lt9611_remove(struct i2c_client *client)
|
||||
|
||||
of_node_put(lt9611->dsi1_node);
|
||||
of_node_put(lt9611->dsi0_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id lt9611_id[] = {
|
||||
|
||||
@@ -978,7 +978,7 @@ err_of_put:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lt9611uxc_remove(struct i2c_client *client)
|
||||
static void lt9611uxc_remove(struct i2c_client *client)
|
||||
{
|
||||
struct lt9611uxc *lt9611uxc = i2c_get_clientdata(client);
|
||||
|
||||
@@ -993,8 +993,6 @@ static int lt9611uxc_remove(struct i2c_client *client)
|
||||
|
||||
of_node_put(lt9611uxc->dsi1_node);
|
||||
of_node_put(lt9611uxc->dsi0_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id lt9611uxc_id[] = {
|
||||
|
||||
@@ -355,11 +355,9 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
|
||||
return ge_b850v3_register();
|
||||
}
|
||||
|
||||
static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
|
||||
static void stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
|
||||
{
|
||||
ge_b850v3_lvds_remove();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id stdp4028_ge_b850v3_fw_i2c_table[] = {
|
||||
@@ -405,11 +403,9 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
|
||||
return ge_b850v3_register();
|
||||
}
|
||||
|
||||
static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
|
||||
static void stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
|
||||
{
|
||||
ge_b850v3_lvds_remove();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id stdp2690_ge_b850v3_fw_i2c_table[] = {
|
||||
|
||||
@@ -315,13 +315,11 @@ static int ptn3460_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ptn3460_remove(struct i2c_client *client)
|
||||
static void ptn3460_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ptn3460_bridge *ptn_bridge = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&ptn_bridge->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ptn3460_i2c_table[] = {
|
||||
|
||||
@@ -520,14 +520,12 @@ static int ps8622_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ps8622_remove(struct i2c_client *client)
|
||||
static void ps8622_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
|
||||
|
||||
backlight_device_unregister(ps8622->bl);
|
||||
drm_bridge_remove(&ps8622->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ps8622_i2c_table[] = {
|
||||
|
||||
@@ -1145,7 +1145,7 @@ static int sii902x_probe(struct i2c_client *client,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sii902x_remove(struct i2c_client *client)
|
||||
static void sii902x_remove(struct i2c_client *client)
|
||||
|
||||
{
|
||||
struct sii902x *sii902x = i2c_get_clientdata(client);
|
||||
@@ -1154,8 +1154,6 @@ static int sii902x_remove(struct i2c_client *client)
|
||||
drm_bridge_remove(&sii902x->bridge);
|
||||
regulator_bulk_disable(ARRAY_SIZE(sii902x->supplies),
|
||||
sii902x->supplies);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sii902x_dt_ids[] = {
|
||||
|
||||
@@ -936,14 +936,12 @@ static int sii9234_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sii9234_remove(struct i2c_client *client)
|
||||
static void sii9234_remove(struct i2c_client *client)
|
||||
{
|
||||
struct sii9234 *ctx = i2c_get_clientdata(client);
|
||||
|
||||
sii9234_cable_out(ctx);
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sii9234_dt_match[] = {
|
||||
|
||||
@@ -2346,7 +2346,7 @@ static int sii8620_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sii8620_remove(struct i2c_client *client)
|
||||
static void sii8620_remove(struct i2c_client *client)
|
||||
{
|
||||
struct sii8620 *ctx = i2c_get_clientdata(client);
|
||||
|
||||
@@ -2360,8 +2360,6 @@ static int sii8620_remove(struct i2c_client *client)
|
||||
sii8620_cable_out(ctx);
|
||||
}
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sii8620_dt_match[] = {
|
||||
|
||||
@@ -2194,13 +2194,11 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tc_remove(struct i2c_client *client)
|
||||
static void tc_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tc_data *tc = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&tc->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tc358767_i2c_ids[] = {
|
||||
|
||||
@@ -1072,13 +1072,11 @@ static int tc358768_i2c_probe(struct i2c_client *client,
|
||||
return mipi_dsi_host_register(&priv->dsi_host);
|
||||
}
|
||||
|
||||
static int tc358768_i2c_remove(struct i2c_client *client)
|
||||
static void tc358768_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tc358768_priv *priv = i2c_get_clientdata(client);
|
||||
|
||||
mipi_dsi_host_unregister(&priv->dsi_host);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_driver tc358768_driver = {
|
||||
|
||||
@@ -704,13 +704,11 @@ err_bridge_remove:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tc_remove(struct i2c_client *client)
|
||||
static void tc_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tc_data *tc = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&tc->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tc358775_i2c_ids[] = {
|
||||
|
||||
@@ -379,14 +379,12 @@ err_remove_bridge:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dlpc3433_remove(struct i2c_client *client)
|
||||
static void dlpc3433_remove(struct i2c_client *client)
|
||||
{
|
||||
struct dlpc *dlpc = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&dlpc->bridge);
|
||||
of_node_put(dlpc->host_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id dlpc3433_id[] = {
|
||||
|
||||
@@ -708,13 +708,11 @@ err_remove_bridge:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sn65dsi83_remove(struct i2c_client *client)
|
||||
static void sn65dsi83_remove(struct i2c_client *client)
|
||||
{
|
||||
struct sn65dsi83 *ctx = i2c_get_clientdata(client);
|
||||
|
||||
drm_bridge_remove(&ctx->bridge);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id sn65dsi83_id[] = {
|
||||
|
||||
@@ -394,11 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
|
||||
return tfp410_init(&client->dev, true);
|
||||
}
|
||||
|
||||
static int tfp410_i2c_remove(struct i2c_client *client)
|
||||
static void tfp410_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
tfp410_fini(&client->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tfp410_i2c_ids[] = {
|
||||
|
||||
@@ -417,11 +417,9 @@ fail:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int ch7006_remove(struct i2c_client *client)
|
||||
static void ch7006_remove(struct i2c_client *client)
|
||||
{
|
||||
ch7006_dbg(client, "\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ch7006_resume(struct device *dev)
|
||||
|
||||
@@ -370,12 +370,6 @@ sil164_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
sil164_remove(struct i2c_client *client)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_client *
|
||||
sil164_detect_slave(struct i2c_client *client)
|
||||
{
|
||||
@@ -427,7 +421,6 @@ MODULE_DEVICE_TABLE(i2c, sil164_ids);
|
||||
static struct drm_i2c_encoder_driver sil164_driver = {
|
||||
.i2c_driver = {
|
||||
.probe = sil164_probe,
|
||||
.remove = sil164_remove,
|
||||
.driver = {
|
||||
.name = "sil164",
|
||||
},
|
||||
|
||||
@@ -478,14 +478,12 @@ static int tda9950_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tda9950_remove(struct i2c_client *client)
|
||||
static void tda9950_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tda9950_priv *priv = i2c_get_clientdata(client);
|
||||
|
||||
cec_notifier_cec_adap_unregister(priv->notify, priv->adap);
|
||||
cec_unregister_adapter(priv->adap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id tda9950_ids[] = {
|
||||
|
||||
@@ -2076,11 +2076,10 @@ tda998x_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tda998x_remove(struct i2c_client *client)
|
||||
static void tda998x_remove(struct i2c_client *client)
|
||||
{
|
||||
component_del(&client->dev, &tda998x_ops);
|
||||
tda998x_destroy(&client->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
@@ -288,7 +288,7 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lcd_olinuxino_remove(struct i2c_client *client)
|
||||
static void lcd_olinuxino_remove(struct i2c_client *client)
|
||||
{
|
||||
struct lcd_olinuxino *panel = i2c_get_clientdata(client);
|
||||
|
||||
@@ -296,8 +296,6 @@ static int lcd_olinuxino_remove(struct i2c_client *client)
|
||||
|
||||
drm_panel_disable(&panel->panel);
|
||||
drm_panel_unprepare(&panel->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id lcd_olinuxino_of_ids[] = {
|
||||
|
||||
@@ -446,7 +446,7 @@ error:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int rpi_touchscreen_remove(struct i2c_client *i2c)
|
||||
static void rpi_touchscreen_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct rpi_touchscreen *ts = i2c_get_clientdata(i2c);
|
||||
|
||||
@@ -455,8 +455,6 @@ static int rpi_touchscreen_remove(struct i2c_client *i2c)
|
||||
drm_panel_remove(&ts->base);
|
||||
|
||||
mipi_dsi_device_unregister(ts->dsi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi)
|
||||
|
||||
@@ -39,13 +39,11 @@ static int ssd130x_i2c_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ssd130x_i2c_remove(struct i2c_client *client)
|
||||
static void ssd130x_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ssd130x_device *ssd130x = i2c_get_clientdata(client);
|
||||
|
||||
ssd130x_remove(ssd130x);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ssd130x_i2c_shutdown(struct i2c_client *client)
|
||||
|
||||
@@ -1064,7 +1064,7 @@ err_powered:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(i2c_hid_core_probe);
|
||||
|
||||
int i2c_hid_core_remove(struct i2c_client *client)
|
||||
void i2c_hid_core_remove(struct i2c_client *client)
|
||||
{
|
||||
struct i2c_hid *ihid = i2c_get_clientdata(client);
|
||||
struct hid_device *hid;
|
||||
@@ -1078,8 +1078,6 @@ int i2c_hid_core_remove(struct i2c_client *client)
|
||||
i2c_hid_free_buffers(ihid);
|
||||
|
||||
i2c_hid_core_power_down(ihid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(i2c_hid_core_remove);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ struct i2chid_ops {
|
||||
|
||||
int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
|
||||
u16 hid_descriptor_address, u32 quirks);
|
||||
int i2c_hid_core_remove(struct i2c_client *client);
|
||||
void i2c_hid_core_remove(struct i2c_client *client);
|
||||
|
||||
void i2c_hid_core_shutdown(struct i2c_client *client);
|
||||
|
||||
|
||||
@@ -495,14 +495,12 @@ error:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int adc128_remove(struct i2c_client *client)
|
||||
static void adc128_remove(struct i2c_client *client)
|
||||
{
|
||||
struct adc128_data *data = i2c_get_clientdata(client);
|
||||
|
||||
if (data->regulator)
|
||||
regulator_disable(data->regulator);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adc128_id[] = {
|
||||
|
||||
@@ -1296,12 +1296,11 @@ static int adt7470_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adt7470_remove(struct i2c_client *client)
|
||||
static void adt7470_remove(struct i2c_client *client)
|
||||
{
|
||||
struct adt7470_data *data = i2c_get_clientdata(client);
|
||||
|
||||
kthread_stop(data->auto_update);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adt7470_id[] = {
|
||||
|
||||
@@ -208,7 +208,7 @@ static void asb100_write_value(struct i2c_client *client, u16 reg, u16 val);
|
||||
static int asb100_probe(struct i2c_client *client);
|
||||
static int asb100_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int asb100_remove(struct i2c_client *client);
|
||||
static void asb100_remove(struct i2c_client *client);
|
||||
static struct asb100_data *asb100_update_device(struct device *dev);
|
||||
static void asb100_init_client(struct i2c_client *client);
|
||||
|
||||
@@ -822,7 +822,7 @@ ERROR3:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int asb100_remove(struct i2c_client *client)
|
||||
static void asb100_remove(struct i2c_client *client)
|
||||
{
|
||||
struct asb100_data *data = i2c_get_clientdata(client);
|
||||
|
||||
@@ -831,8 +831,6 @@ static int asb100_remove(struct i2c_client *client)
|
||||
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1165,7 +1165,7 @@ static int asc7621_detect(struct i2c_client *client,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int asc7621_remove(struct i2c_client *client)
|
||||
static void asc7621_remove(struct i2c_client *client)
|
||||
{
|
||||
struct asc7621_data *data = i2c_get_clientdata(client);
|
||||
int i;
|
||||
@@ -1176,8 +1176,6 @@ static int asc7621_remove(struct i2c_client *client)
|
||||
device_remove_file(&client->dev,
|
||||
&(asc7621_params[i].sda.dev_attr));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id asc7621_id[] = {
|
||||
|
||||
@@ -2508,14 +2508,12 @@ exit_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int dme1737_i2c_remove(struct i2c_client *client)
|
||||
static void dme1737_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct dme1737_data *data = i2c_get_clientdata(client);
|
||||
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
dme1737_remove_files(&client->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id dme1737_id[] = {
|
||||
|
||||
@@ -114,7 +114,7 @@ struct f75375_data {
|
||||
static int f75375_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int f75375_probe(struct i2c_client *client);
|
||||
static int f75375_remove(struct i2c_client *client);
|
||||
static void f75375_remove(struct i2c_client *client);
|
||||
|
||||
static const struct i2c_device_id f75375_id[] = {
|
||||
{ "f75373", f75373 },
|
||||
@@ -864,12 +864,11 @@ exit_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int f75375_remove(struct i2c_client *client)
|
||||
static void f75375_remove(struct i2c_client *client)
|
||||
{
|
||||
struct f75375_data *data = i2c_get_clientdata(client);
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
sysfs_remove_group(&client->dev.kobj, &f75375_group);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return 0 if detection is successful, -ENODEV otherwise */
|
||||
|
||||
@@ -217,7 +217,7 @@ static const int FSCHMD_NO_TEMP_SENSORS[7] = { 3, 3, 4, 3, 5, 5, 11 };
|
||||
static int fschmd_probe(struct i2c_client *client);
|
||||
static int fschmd_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int fschmd_remove(struct i2c_client *client);
|
||||
static void fschmd_remove(struct i2c_client *client);
|
||||
static struct fschmd_data *fschmd_update_device(struct device *dev);
|
||||
|
||||
/*
|
||||
@@ -1248,7 +1248,7 @@ exit_detach:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fschmd_remove(struct i2c_client *client)
|
||||
static void fschmd_remove(struct i2c_client *client)
|
||||
{
|
||||
struct fschmd_data *data = i2c_get_clientdata(client);
|
||||
int i;
|
||||
@@ -1291,8 +1291,6 @@ static int fschmd_remove(struct i2c_client *client)
|
||||
mutex_lock(&watchdog_data_mutex);
|
||||
kref_put(&data->kref, fschmd_release_resources);
|
||||
mutex_unlock(&watchdog_data_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct fschmd_data *fschmd_update_device(struct device *dev)
|
||||
|
||||
@@ -744,12 +744,11 @@ static int fts_detect(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fts_remove(struct i2c_client *client)
|
||||
static void fts_remove(struct i2c_client *client)
|
||||
{
|
||||
struct fts_data *data = dev_get_drvdata(&client->dev);
|
||||
|
||||
watchdog_unregister_device(&data->wdd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fts_probe(struct i2c_client *client)
|
||||
|
||||
@@ -568,13 +568,11 @@ out_restore_conf:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ina209_remove(struct i2c_client *client)
|
||||
static void ina209_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ina209_data *data = i2c_get_clientdata(client);
|
||||
|
||||
ina209_restore_conf(client, data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ina209_id[] = {
|
||||
|
||||
@@ -913,7 +913,7 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ina3221_remove(struct i2c_client *client)
|
||||
static void ina3221_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ina3221_data *ina = dev_get_drvdata(&client->dev);
|
||||
int i;
|
||||
@@ -926,8 +926,6 @@ static int ina3221_remove(struct i2c_client *client)
|
||||
pm_runtime_put_noidle(ina->pm_dev);
|
||||
|
||||
mutex_destroy(&ina->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused ina3221_suspend(struct device *dev)
|
||||
|
||||
@@ -524,7 +524,7 @@ static int jc42_probe(struct i2c_client *client)
|
||||
return PTR_ERR_OR_ZERO(hwmon_dev);
|
||||
}
|
||||
|
||||
static int jc42_remove(struct i2c_client *client)
|
||||
static void jc42_remove(struct i2c_client *client)
|
||||
{
|
||||
struct jc42_data *data = i2c_get_clientdata(client);
|
||||
|
||||
@@ -537,7 +537,6 @@ static int jc42_remove(struct i2c_client *client)
|
||||
| (data->config & JC42_CFG_HYST_MASK);
|
||||
i2c_smbus_write_word_swapped(client, JC42_REG_CONFIG, config);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -227,13 +227,11 @@ static int p8_i2c_occ_probe(struct i2c_client *client)
|
||||
return occ_setup(occ);
|
||||
}
|
||||
|
||||
static int p8_i2c_occ_remove(struct i2c_client *client)
|
||||
static void p8_i2c_occ_remove(struct i2c_client *client)
|
||||
{
|
||||
struct occ *occ = dev_get_drvdata(&client->dev);
|
||||
|
||||
occ_shutdown(occ);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id p8_i2c_occ_of_match[] = {
|
||||
|
||||
@@ -228,14 +228,13 @@ exit_sysfs_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int pcf8591_remove(struct i2c_client *client)
|
||||
static void pcf8591_remove(struct i2c_client *client)
|
||||
{
|
||||
struct pcf8591_data *data = i2c_get_clientdata(client);
|
||||
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt);
|
||||
sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Called when we have found a new PCF8591. */
|
||||
|
||||
@@ -671,12 +671,11 @@ out_unregister:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int smm665_remove(struct i2c_client *client)
|
||||
static void smm665_remove(struct i2c_client *client)
|
||||
{
|
||||
struct smm665_data *data = i2c_get_clientdata(client);
|
||||
|
||||
i2c_unregister_device(data->cmdreg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id smm665_id[] = {
|
||||
|
||||
@@ -590,13 +590,11 @@ static int tps23861_probe(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tps23861_remove(struct i2c_client *client)
|
||||
static void tps23861_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tps23861_data *data = i2c_get_clientdata(client);
|
||||
|
||||
debugfs_remove_recursive(data->debugfs_dir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id __maybe_unused tps23861_of_match[] = {
|
||||
|
||||
@@ -1239,7 +1239,7 @@ static int w83781d_probe(struct i2c_client *client)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
w83781d_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83781d_data *data = i2c_get_clientdata(client);
|
||||
@@ -1250,8 +1250,6 @@ w83781d_remove(struct i2c_client *client)
|
||||
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -315,7 +315,7 @@ struct w83791d_data {
|
||||
static int w83791d_probe(struct i2c_client *client);
|
||||
static int w83791d_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int w83791d_remove(struct i2c_client *client);
|
||||
static void w83791d_remove(struct i2c_client *client);
|
||||
|
||||
static int w83791d_read(struct i2c_client *client, u8 reg);
|
||||
static int w83791d_write(struct i2c_client *client, u8 reg, u8 value);
|
||||
@@ -1405,14 +1405,12 @@ error4:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int w83791d_remove(struct i2c_client *client)
|
||||
static void w83791d_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83791d_data *data = i2c_get_clientdata(client);
|
||||
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
sysfs_remove_group(&client->dev.kobj, &w83791d_group);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void w83791d_init_client(struct i2c_client *client)
|
||||
|
||||
@@ -286,7 +286,7 @@ struct w83792d_data {
|
||||
static int w83792d_probe(struct i2c_client *client);
|
||||
static int w83792d_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int w83792d_remove(struct i2c_client *client);
|
||||
static void w83792d_remove(struct i2c_client *client);
|
||||
static struct w83792d_data *w83792d_update_device(struct device *dev);
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -1429,7 +1429,7 @@ exit_remove_files:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
w83792d_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83792d_data *data = i2c_get_clientdata(client);
|
||||
@@ -1440,8 +1440,6 @@ w83792d_remove(struct i2c_client *client)
|
||||
for (i = 0; i < ARRAY_SIZE(w83792d_group_fan); i++)
|
||||
sysfs_remove_group(&client->dev.kobj,
|
||||
&w83792d_group_fan[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -285,7 +285,7 @@ static int w83793_write_value(struct i2c_client *client, u16 reg, u8 value);
|
||||
static int w83793_probe(struct i2c_client *client);
|
||||
static int w83793_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int w83793_remove(struct i2c_client *client);
|
||||
static void w83793_remove(struct i2c_client *client);
|
||||
static void w83793_init_client(struct i2c_client *client);
|
||||
static void w83793_update_nonvolatile(struct device *dev);
|
||||
static struct w83793_data *w83793_update_device(struct device *dev);
|
||||
@@ -1495,7 +1495,7 @@ static struct notifier_block watchdog_notifier = {
|
||||
* Init / remove routines
|
||||
*/
|
||||
|
||||
static int w83793_remove(struct i2c_client *client)
|
||||
static void w83793_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83793_data *data = i2c_get_clientdata(client);
|
||||
struct device *dev = &client->dev;
|
||||
@@ -1554,8 +1554,6 @@ static int w83793_remove(struct i2c_client *client)
|
||||
mutex_lock(&watchdog_data_mutex);
|
||||
kref_put(&data->kref, w83793_release_resources);
|
||||
mutex_unlock(&watchdog_data_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -2235,14 +2235,12 @@ exit_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int w83795_remove(struct i2c_client *client)
|
||||
static void w83795_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83795_data *data = i2c_get_clientdata(client);
|
||||
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
w83795_handle_files(&client->dev, device_remove_file_wrapper);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
|
||||
static int w83l785ts_probe(struct i2c_client *client);
|
||||
static int w83l785ts_detect(struct i2c_client *client,
|
||||
struct i2c_board_info *info);
|
||||
static int w83l785ts_remove(struct i2c_client *client);
|
||||
static void w83l785ts_remove(struct i2c_client *client);
|
||||
static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval);
|
||||
static struct w83l785ts_data *w83l785ts_update_device(struct device *dev);
|
||||
|
||||
@@ -203,7 +203,7 @@ exit_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int w83l785ts_remove(struct i2c_client *client)
|
||||
static void w83l785ts_remove(struct i2c_client *client)
|
||||
{
|
||||
struct w83l785ts_data *data = i2c_get_clientdata(client);
|
||||
|
||||
@@ -212,8 +212,6 @@ static int w83l785ts_remove(struct i2c_client *client)
|
||||
&sensor_dev_attr_temp1_input.dev_attr);
|
||||
device_remove_file(&client->dev,
|
||||
&sensor_dev_attr_temp1_max.dev_attr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
|
||||
|
||||
@@ -1267,6 +1267,16 @@ config I2C_PARPORT
|
||||
This support is also available as a module. If so, the module
|
||||
will be called i2c-parport.
|
||||
|
||||
config I2C_PCI1XXXX
|
||||
tristate "PCI1XXXX I2C Host Adapter"
|
||||
depends on PCI
|
||||
help
|
||||
If you say yes to this option, support will be included for
|
||||
Microchip PCI1XXXX's I2C interface.
|
||||
|
||||
This driver can also be built as a module. If so, the module will
|
||||
be called i2c-mchp-pci1xxxx.
|
||||
|
||||
config I2C_ROBOTFUZZ_OSIF
|
||||
tristate "RobotFuzz Open Source InterFace USB adapter"
|
||||
depends on USB
|
||||
|
||||
@@ -133,6 +133,7 @@ obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o
|
||||
obj-$(CONFIG_I2C_DLN2) += i2c-dln2.o
|
||||
obj-$(CONFIG_I2C_CP2615) += i2c-cp2615.o
|
||||
obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o
|
||||
obj-$(CONFIG_I2C_PCI1XXXX) += i2c-mchp-pci1xxxx.o
|
||||
obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF) += i2c-robotfuzz-osif.o
|
||||
obj-$(CONFIG_I2C_TAOS_EVM) += i2c-taos-evm.o
|
||||
obj-$(CONFIG_I2C_TINY_USB) += i2c-tiny-usb.o
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
/* Register offsets for the I2C device. */
|
||||
#define CDNS_I2C_CR_OFFSET 0x00 /* Control Register, RW */
|
||||
@@ -127,6 +129,8 @@
|
||||
#define CDNS_I2C_TIMEOUT_MAX 0xFF
|
||||
|
||||
#define CDNS_I2C_BROKEN_HOLD_BIT BIT(0)
|
||||
#define CDNS_I2C_POLL_US 100000
|
||||
#define CDNS_I2C_TIMEOUT_US 500000
|
||||
|
||||
#define cdns_i2c_readreg(offset) readl_relaxed(id->membase + offset)
|
||||
#define cdns_i2c_writereg(val, offset) writel_relaxed(val, id->membase + offset)
|
||||
@@ -204,6 +208,7 @@ struct cdns_i2c {
|
||||
struct notifier_block clk_rate_change_nb;
|
||||
u32 quirks;
|
||||
u32 ctrl_reg;
|
||||
struct i2c_bus_recovery_info rinfo;
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
u16 ctrl_reg_diva_divb;
|
||||
struct i2c_client *slave;
|
||||
@@ -840,8 +845,14 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
||||
#endif
|
||||
|
||||
/* Check if the bus is free */
|
||||
if (cdns_i2c_readreg(CDNS_I2C_SR_OFFSET) & CDNS_I2C_SR_BA) {
|
||||
|
||||
ret = readl_relaxed_poll_timeout(id->membase + CDNS_I2C_SR_OFFSET,
|
||||
reg,
|
||||
!(reg & CDNS_I2C_SR_BA),
|
||||
CDNS_I2C_POLL_US, CDNS_I2C_TIMEOUT_US);
|
||||
if (ret) {
|
||||
ret = -EAGAIN;
|
||||
i2c_recover_bus(adap);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1250,6 +1261,12 @@ static int cdns_i2c_probe(struct platform_device *pdev)
|
||||
id->quirks = data->quirks;
|
||||
}
|
||||
|
||||
id->rinfo.pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||
if (IS_ERR(id->rinfo.pinctrl)) {
|
||||
dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
|
||||
return PTR_ERR(id->rinfo.pinctrl);
|
||||
}
|
||||
|
||||
id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
|
||||
if (IS_ERR(id->membase))
|
||||
return PTR_ERR(id->membase);
|
||||
@@ -1266,6 +1283,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
|
||||
id->adap.retries = 3; /* Default retry value. */
|
||||
id->adap.algo_data = id;
|
||||
id->adap.dev.parent = &pdev->dev;
|
||||
id->adap.bus_recovery_info = &id->rinfo;
|
||||
init_completion(&id->xfer_done);
|
||||
snprintf(id->adap.name, sizeof(id->adap.name),
|
||||
"Cadence I2C at %08lx", (unsigned long)r_mem->start);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <linux/io-64-nonatomic-lo-hi.h>
|
||||
#include <linux/psp-sev.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#include <asm/msr.h>
|
||||
|
||||
@@ -15,6 +16,8 @@
|
||||
#define PSP_MBOX_OFFSET 0x10570
|
||||
#define PSP_CMD_TIMEOUT_US (500 * USEC_PER_MSEC)
|
||||
|
||||
#define PSP_I2C_RESERVATION_TIME_MS 100
|
||||
|
||||
#define PSP_I2C_REQ_BUS_CMD 0x64
|
||||
#define PSP_I2C_REQ_RETRY_CNT 400
|
||||
#define PSP_I2C_REQ_RETRY_DELAY_US (25 * USEC_PER_MSEC)
|
||||
@@ -240,6 +243,41 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void release_bus(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
if (!psp_i2c_sem_acquired)
|
||||
return;
|
||||
|
||||
status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
|
||||
if (status)
|
||||
return;
|
||||
|
||||
dev_dbg(psp_i2c_dev, "PSP semaphore held for %ums\n",
|
||||
jiffies_to_msecs(jiffies - psp_i2c_sem_acquired));
|
||||
|
||||
psp_i2c_sem_acquired = 0;
|
||||
}
|
||||
|
||||
static void psp_release_i2c_bus_deferred(struct work_struct *work)
|
||||
{
|
||||
mutex_lock(&psp_i2c_access_mutex);
|
||||
|
||||
/*
|
||||
* If there is any pending transaction, cannot release the bus here.
|
||||
* psp_release_i2c_bus will take care of this later.
|
||||
*/
|
||||
if (psp_i2c_access_count)
|
||||
goto cleanup;
|
||||
|
||||
release_bus();
|
||||
|
||||
cleanup:
|
||||
mutex_unlock(&psp_i2c_access_mutex);
|
||||
}
|
||||
static DECLARE_DELAYED_WORK(release_queue, psp_release_i2c_bus_deferred);
|
||||
|
||||
static int psp_acquire_i2c_bus(void)
|
||||
{
|
||||
int status;
|
||||
@@ -250,21 +288,23 @@ static int psp_acquire_i2c_bus(void)
|
||||
if (psp_i2c_mbox_fail)
|
||||
goto cleanup;
|
||||
|
||||
psp_i2c_access_count++;
|
||||
|
||||
/*
|
||||
* Simply increment usage counter and return if PSP semaphore was
|
||||
* already taken by kernel.
|
||||
* No need to request bus arbitration once we are inside semaphore
|
||||
* reservation period.
|
||||
*/
|
||||
if (psp_i2c_access_count) {
|
||||
psp_i2c_access_count++;
|
||||
if (psp_i2c_sem_acquired)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
status = psp_send_i2c_req(PSP_I2C_REQ_ACQUIRE);
|
||||
if (status)
|
||||
goto cleanup;
|
||||
|
||||
psp_i2c_sem_acquired = jiffies;
|
||||
psp_i2c_access_count++;
|
||||
|
||||
schedule_delayed_work(&release_queue,
|
||||
msecs_to_jiffies(PSP_I2C_RESERVATION_TIME_MS));
|
||||
|
||||
/*
|
||||
* In case of errors with PSP arbitrator psp_i2c_mbox_fail variable is
|
||||
@@ -279,8 +319,6 @@ cleanup:
|
||||
|
||||
static void psp_release_i2c_bus(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
mutex_lock(&psp_i2c_access_mutex);
|
||||
|
||||
/* Return early if mailbox was malfunctional */
|
||||
@@ -295,13 +333,12 @@ static void psp_release_i2c_bus(void)
|
||||
if (psp_i2c_access_count)
|
||||
goto cleanup;
|
||||
|
||||
/* Send a release command to PSP */
|
||||
status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
|
||||
if (status)
|
||||
goto cleanup;
|
||||
|
||||
dev_dbg(psp_i2c_dev, "PSP semaphore held for %ums\n",
|
||||
jiffies_to_msecs(jiffies - psp_i2c_sem_acquired));
|
||||
/*
|
||||
* Send a release command to PSP if the semaphore reservation timeout
|
||||
* elapsed but x86 still owns the controller.
|
||||
*/
|
||||
if (!delayed_work_pending(&release_queue))
|
||||
release_bus();
|
||||
|
||||
cleanup:
|
||||
mutex_unlock(&psp_i2c_access_mutex);
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "i2c-ccgx-ucsi.h"
|
||||
|
||||
#define DRIVER_NAME "i2c-designware-pci"
|
||||
#define AMD_CLK_RATE_HZ 100000
|
||||
|
||||
enum dw_pci_ctl_id_t {
|
||||
medfield,
|
||||
@@ -100,11 +99,6 @@ static u32 mfld_get_clk_rate_khz(struct dw_i2c_dev *dev)
|
||||
return 25000;
|
||||
}
|
||||
|
||||
static u32 navi_amd_get_clk_rate_khz(struct dw_i2c_dev *dev)
|
||||
{
|
||||
return AMD_CLK_RATE_HZ;
|
||||
}
|
||||
|
||||
static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
|
||||
{
|
||||
struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
|
||||
@@ -126,15 +120,6 @@ static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
|
||||
{
|
||||
struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
|
||||
|
||||
dev->flags |= MODEL_AMD_NAVI_GPU;
|
||||
dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mrfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
|
||||
{
|
||||
/*
|
||||
@@ -159,6 +144,20 @@ static u32 ehl_get_clk_rate_khz(struct dw_i2c_dev *dev)
|
||||
return 100000;
|
||||
}
|
||||
|
||||
static u32 navi_amd_get_clk_rate_khz(struct dw_i2c_dev *dev)
|
||||
{
|
||||
return 100000;
|
||||
}
|
||||
|
||||
static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
|
||||
{
|
||||
struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
|
||||
|
||||
dev->flags |= MODEL_AMD_NAVI_GPU;
|
||||
dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dw_pci_controller dw_pci_controllers[] = {
|
||||
[medfield] = {
|
||||
.bus_num = -1,
|
||||
@@ -243,6 +242,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
int r;
|
||||
struct dw_pci_controller *controller;
|
||||
struct dw_scl_sda_cfg *cfg;
|
||||
struct i2c_timings *t;
|
||||
|
||||
if (id->driver_data >= ARRAY_SIZE(dw_pci_controllers))
|
||||
return dev_err_probe(&pdev->dev, -EINVAL,
|
||||
@@ -263,7 +263,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
return dev_err_probe(&pdev->dev, r,
|
||||
"I/O memory remapping failed\n");
|
||||
|
||||
dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
|
||||
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -272,12 +272,14 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||
return r;
|
||||
|
||||
dev->get_clk_rate_khz = controller->get_clk_rate_khz;
|
||||
dev->timings.bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
|
||||
dev->base = pcim_iomap_table(pdev)[0];
|
||||
dev->dev = &pdev->dev;
|
||||
dev->irq = pci_irq_vector(pdev, 0);
|
||||
dev->flags |= controller->flags;
|
||||
|
||||
t = &dev->timings;
|
||||
i2c_parse_fw_timings(&pdev->dev, t, false);
|
||||
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
if (controller->setup) {
|
||||
@@ -389,6 +391,7 @@ static const struct pci_device_id i2_designware_pci_ids[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0x4bbe), elkhartlake },
|
||||
{ PCI_VDEVICE(INTEL, 0x4bbf), elkhartlake },
|
||||
{ PCI_VDEVICE(INTEL, 0x4bc0), elkhartlake },
|
||||
/* AMD NAVI */
|
||||
{ PCI_VDEVICE(ATI, 0x7314), navi_amd },
|
||||
{ PCI_VDEVICE(ATI, 0x73a4), navi_amd },
|
||||
{ PCI_VDEVICE(ATI, 0x73e4), navi_amd },
|
||||
|
||||
@@ -1838,6 +1838,7 @@ static struct pci_driver i801_driver = {
|
||||
.shutdown = i801_shutdown,
|
||||
.driver = {
|
||||
.pm = &i801_pm_ops,
|
||||
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,8 @@ enum lpi2c_imx_pincfg {
|
||||
|
||||
struct lpi2c_imx_struct {
|
||||
struct i2c_adapter adapter;
|
||||
struct clk *clk;
|
||||
int num_clks;
|
||||
struct clk_bulk_data *clks;
|
||||
void __iomem *base;
|
||||
__u8 *rx_buf;
|
||||
__u8 *tx_buf;
|
||||
@@ -207,7 +208,7 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
|
||||
|
||||
lpi2c_imx_set_mode(lpi2c_imx);
|
||||
|
||||
clk_rate = clk_get_rate(lpi2c_imx->clk);
|
||||
clk_rate = clk_get_rate(lpi2c_imx->clks[0].clk);
|
||||
if (lpi2c_imx->mode == HS || lpi2c_imx->mode == ULTRA_FAST)
|
||||
filt = 0;
|
||||
else
|
||||
@@ -561,11 +562,12 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
|
||||
strscpy(lpi2c_imx->adapter.name, pdev->name,
|
||||
sizeof(lpi2c_imx->adapter.name));
|
||||
|
||||
lpi2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(lpi2c_imx->clk)) {
|
||||
dev_err(&pdev->dev, "can't get I2C peripheral clock\n");
|
||||
return PTR_ERR(lpi2c_imx->clk);
|
||||
ret = devm_clk_bulk_get_all(&pdev->dev, &lpi2c_imx->clks);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "can't get I2C peripheral clock, ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
lpi2c_imx->num_clks = ret;
|
||||
|
||||
ret = of_property_read_u32(pdev->dev.of_node,
|
||||
"clock-frequency", &lpi2c_imx->bitrate);
|
||||
@@ -582,11 +584,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
|
||||
i2c_set_adapdata(&lpi2c_imx->adapter, lpi2c_imx);
|
||||
platform_set_drvdata(pdev, lpi2c_imx);
|
||||
|
||||
ret = clk_prepare_enable(lpi2c_imx->clk);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "clk enable failed %d\n", ret);
|
||||
ret = clk_bulk_prepare_enable(lpi2c_imx->num_clks, lpi2c_imx->clks);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, I2C_PM_TIMEOUT);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
@@ -633,7 +633,7 @@ static int __maybe_unused lpi2c_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct lpi2c_imx_struct *lpi2c_imx = dev_get_drvdata(dev);
|
||||
|
||||
clk_disable_unprepare(lpi2c_imx->clk);
|
||||
clk_bulk_disable_unprepare(lpi2c_imx->num_clks, lpi2c_imx->clks);
|
||||
pinctrl_pm_select_sleep_state(dev);
|
||||
|
||||
return 0;
|
||||
@@ -645,7 +645,7 @@ static int __maybe_unused lpi2c_runtime_resume(struct device *dev)
|
||||
int ret;
|
||||
|
||||
pinctrl_pm_select_default_state(dev);
|
||||
ret = clk_prepare_enable(lpi2c_imx->clk);
|
||||
ret = clk_bulk_prepare_enable(lpi2c_imx->num_clks, lpi2c_imx->clks);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to enable I2C clock, ret=%d\n", ret);
|
||||
return ret;
|
||||
|
||||
@@ -937,11 +937,8 @@ ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (err) {
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "dma_set_mask fail\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
dev_err(&pdev->dev, "dma_set_mask fail\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
err = ismt_dev_init(priv);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user