Skip to content
Snippets Groups Projects
Commit 1d40b891 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12253581 from 2429fa3e to...

Snap for 12253581 from 2429fa3e to android13-gs-pixel-5.10-24Q4-release

Change-Id: Ie89dc99d3a1069d26a3d477e0c11bfdb492e30eb
Signed-off-by: default avatarCoastguard Worker <android-build-coastguard-worker@google.com>
parents bb49308b 2429fa3e
No related merge requests found
...@@ -99,10 +99,11 @@ ...@@ -99,10 +99,11 @@
status = "okay"; status = "okay";
clock-frequency = <370000>; clock-frequency = <370000>;
pinctrl-names = "default","on_i2c","off_i2c"; pinctrl-names = "default","on_i2c","off_i2c","recovery";
pinctrl-0 = <&hsi2c7_bus &spi14_cs2>; pinctrl-0 = <&hsi2c7_bus &spi14_cs2>;
pinctrl-1 = <&hsi2c7_bus>; pinctrl-1 = <&hsi2c7_bus>;
pinctrl-2 = <&hsi2c7_bus>; pinctrl-2 = <&hsi2c7_bus>;
pinctrl-3 = <>;
}; };
&sensor_mclk2_fn { &sensor_mclk2_fn {
......
...@@ -124,10 +124,11 @@ ...@@ -124,10 +124,11 @@
status = "okay"; status = "okay";
clock-frequency = <370000>; clock-frequency = <370000>;
pinctrl-names = "default","on_i2c","off_i2c"; pinctrl-names = "default","on_i2c","off_i2c","recovery";
pinctrl-0 = <&hsi2c7_bus &spi14_cs2>; pinctrl-0 = <&hsi2c7_bus &spi14_cs2>;
pinctrl-1 = <&hsi2c7_bus>; pinctrl-1 = <&hsi2c7_bus>;
pinctrl-2 = <&hsi2c7_bus>; pinctrl-2 = <&hsi2c7_bus>;
pinctrl-3 = <>;
}; };
/ { / {
......
...@@ -206,8 +206,9 @@ ...@@ -206,8 +206,9 @@
samsung,scl-clk-stretching; samsung,scl-clk-stretching;
samsung,usi-i2c-v2; samsung,usi-i2c-v2;
interrupts = <GIC_SPI IRQ_USI7_USI_PERIC0 ITLH>; interrupts = <GIC_SPI IRQ_USI7_USI_PERIC0 ITLH>;
pinctrl-names = "default"; pinctrl-names = "default", "recovery";
pinctrl-0 = <&hsi2c7_bus>; pinctrl-0 = <&hsi2c7_bus>;
pinctrl-1 = <>;
clocks = <&clock VDOUT_CLK_PERIC0_USI7_USI>, <&clock GATE_PERIC0_TOP0_USI7_USI>; clocks = <&clock VDOUT_CLK_PERIC0_USI7_USI>, <&clock GATE_PERIC0_TOP0_USI7_USI>;
clock-names = "ipclk_hsi2c", "gate_hsi2c_clk"; clock-names = "ipclk_hsi2c", "gate_hsi2c_clk";
gpio_scl= <&gpp14 0 0x1>; gpio_scl= <&gpp14 0 0x1>;
......
...@@ -68,9 +68,6 @@ ...@@ -68,9 +68,6 @@
#size-cells = <0>; #size-cells = <0>;
status = "okay"; status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&hsi2c8_bus>;
clock-frequency = <400000>; clock-frequency = <400000>;
cs40l26a_haptics: cs40l26a@43 { cs40l26a_haptics: cs40l26a@43 {
......
...@@ -234,8 +234,9 @@ ...@@ -234,8 +234,9 @@
samsung,no_lose_arbitration; samsung,no_lose_arbitration;
samsung,usi-i2c-v2; samsung,usi-i2c-v2;
interrupts = <GIC_SPI IRQ_USI8_USI_PERIC0 ITLH>; interrupts = <GIC_SPI IRQ_USI8_USI_PERIC0 ITLH>;
pinctrl-names = "default"; pinctrl-names = "default", "recovery";
pinctrl-0 = <&hsi2c8_bus>; pinctrl-0 = <&hsi2c8_bus>;
pinctrl-1 = <>;
clocks = <&clock VDOUT_CLK_PERIC0_USI8_USI>, <&clock GATE_PERIC0_TOP0_USI8_USI>; clocks = <&clock VDOUT_CLK_PERIC0_USI8_USI>, <&clock GATE_PERIC0_TOP0_USI8_USI>;
clock-names = "ipclk_hsi2c", "gate_hsi2c_clk"; clock-names = "ipclk_hsi2c", "gate_hsi2c_clk";
gpio_scl= <&gpp16 0 0x1>; gpio_scl= <&gpp16 0 0x1>;
......
...@@ -145,12 +145,12 @@ static int smc_send_message(struct scmi_chan_info *cinfo, ...@@ -145,12 +145,12 @@ static int smc_send_message(struct scmi_chan_info *cinfo,
shmem_tx_prepare(scmi_info->shmem, xfer); shmem_tx_prepare(scmi_info->shmem, xfer);
if (scmi_info->irq) if (scmi_info->irq > 0)
reinit_completion(&scmi_info->tx_complete); reinit_completion(&scmi_info->tx_complete);
arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res); arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
if (scmi_info->irq) if (scmi_info->irq > 0)
wait_for_completion(&scmi_info->tx_complete); wait_for_completion(&scmi_info->tx_complete);
scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem)); scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem));
......
...@@ -585,6 +585,31 @@ static unsigned int at24_get_offset_adj(u8 flags, unsigned int byte_len) ...@@ -585,6 +585,31 @@ static unsigned int at24_get_offset_adj(u8 flags, unsigned int byte_len)
} }
} }
static void at24_probe_temp_sensor(struct i2c_client *client)
{
struct at24_data *at24 = i2c_get_clientdata(client);
struct i2c_board_info info = { .type = "jc42" };
int ret;
u8 val;
/*
* Byte 2 has value 11 for DDR3, earlier versions don't
* support the thermal sensor present flag
*/
ret = at24_read(at24, 2, &val, 1);
if (ret || val != 11)
return;
/* Byte 32, bit 7 is set if temp sensor is present */
ret = at24_read(at24, 32, &val, 1);
if (ret || !(val & BIT(7)))
return;
info.addr = 0x18 | (client->addr & 7);
i2c_new_client_device(client->adapter, &info);
}
static int at24_probe(struct i2c_client *client) static int at24_probe(struct i2c_client *client)
{ {
struct regmap_config regmap_config = { }; struct regmap_config regmap_config = { };
...@@ -757,14 +782,6 @@ static int at24_probe(struct i2c_client *client) ...@@ -757,14 +782,6 @@ static int at24_probe(struct i2c_client *client)
pm_runtime_set_active(dev); pm_runtime_set_active(dev);
pm_runtime_enable(dev); pm_runtime_enable(dev);
at24->nvmem = devm_nvmem_register(dev, &nvmem_config);
if (IS_ERR(at24->nvmem)) {
pm_runtime_disable(dev);
if (!pm_runtime_status_suspended(dev))
regulator_disable(at24->vcc_reg);
return PTR_ERR(at24->nvmem);
}
/* /*
* Perform a one-byte test read to verify that the * Perform a one-byte test read to verify that the
* chip is functional. * chip is functional.
...@@ -777,6 +794,19 @@ static int at24_probe(struct i2c_client *client) ...@@ -777,6 +794,19 @@ static int at24_probe(struct i2c_client *client)
return -ENODEV; return -ENODEV;
} }
at24->nvmem = devm_nvmem_register(dev, &nvmem_config);
if (IS_ERR(at24->nvmem)) {
pm_runtime_disable(dev);
if (!pm_runtime_status_suspended(dev))
regulator_disable(at24->vcc_reg);
return dev_err_probe(dev, PTR_ERR(at24->nvmem),
"failed to register nvmem\n");
}
/* If this a SPD EEPROM, probe for DDR3 thermal sensor */
if (cdata == &at24_data_spd)
at24_probe_temp_sensor(client);
pm_runtime_idle(dev); pm_runtime_idle(dev);
if (writable) if (writable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment