mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Merge 4634129ad9 ("Merge tag 'soc-fixes-5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.16-final Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I4ea9871219beda08136739535d785383c050c2cc
This commit is contained in:
@@ -29,6 +29,7 @@ properties:
|
||||
- ti,am654-ospi
|
||||
- intel,lgm-qspi
|
||||
- xlnx,versal-ospi-1.0
|
||||
- intel,socfpga-qspi
|
||||
- const: cdns,qspi-nor
|
||||
- const: cdns,qspi-nor
|
||||
|
||||
|
||||
@@ -782,7 +782,7 @@
|
||||
};
|
||||
|
||||
qspi: spi@ff705000 {
|
||||
compatible = "cdns,qspi-nor";
|
||||
compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff705000 0x1000>,
|
||||
|
||||
@@ -756,7 +756,7 @@
|
||||
};
|
||||
|
||||
qspi: spi@ff809000 {
|
||||
compatible = "cdns,qspi-nor";
|
||||
compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff809000 0x100>,
|
||||
|
||||
@@ -594,7 +594,7 @@
|
||||
};
|
||||
|
||||
qspi: spi@ff8d2000 {
|
||||
compatible = "cdns,qspi-nor";
|
||||
compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff8d2000 0x100>,
|
||||
|
||||
@@ -628,7 +628,7 @@
|
||||
};
|
||||
|
||||
qspi: spi@ff8d2000 {
|
||||
compatible = "cdns,qspi-nor";
|
||||
compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xff8d2000 0x100>,
|
||||
|
||||
@@ -492,7 +492,7 @@ static void mpc_i2c_finish(struct mpc_i2c *i2c, int rc)
|
||||
|
||||
static void mpc_i2c_do_action(struct mpc_i2c *i2c)
|
||||
{
|
||||
struct i2c_msg *msg = &i2c->msgs[i2c->curr_msg];
|
||||
struct i2c_msg *msg = NULL;
|
||||
int dir = 0;
|
||||
int recv_len = 0;
|
||||
u8 byte;
|
||||
@@ -501,10 +501,13 @@ static void mpc_i2c_do_action(struct mpc_i2c *i2c)
|
||||
|
||||
i2c->cntl_bits &= ~(CCR_RSTA | CCR_MTX | CCR_TXAK);
|
||||
|
||||
if (msg->flags & I2C_M_RD)
|
||||
dir = 1;
|
||||
if (msg->flags & I2C_M_RECV_LEN)
|
||||
recv_len = 1;
|
||||
if (i2c->action != MPC_I2C_ACTION_STOP) {
|
||||
msg = &i2c->msgs[i2c->curr_msg];
|
||||
if (msg->flags & I2C_M_RD)
|
||||
dir = 1;
|
||||
if (msg->flags & I2C_M_RECV_LEN)
|
||||
recv_len = 1;
|
||||
}
|
||||
|
||||
switch (i2c->action) {
|
||||
case MPC_I2C_ACTION_RESTART:
|
||||
@@ -581,7 +584,7 @@ static void mpc_i2c_do_action(struct mpc_i2c *i2c)
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg->len == i2c->byte_posn) {
|
||||
if (msg && msg->len == i2c->byte_posn) {
|
||||
i2c->curr_msg++;
|
||||
i2c->byte_posn = 0;
|
||||
|
||||
|
||||
@@ -466,14 +466,12 @@ static int i2c_smbus_host_notify_to_irq(const struct i2c_client *client)
|
||||
static int i2c_device_probe(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
struct i2c_adapter *adap;
|
||||
struct i2c_driver *driver;
|
||||
int status;
|
||||
|
||||
if (!client)
|
||||
return 0;
|
||||
|
||||
adap = client->adapter;
|
||||
client->irq = client->init_irq;
|
||||
|
||||
if (!client->irq) {
|
||||
@@ -539,14 +537,6 @@ static int i2c_device_probe(struct device *dev)
|
||||
|
||||
dev_dbg(dev, "probe\n");
|
||||
|
||||
if (adap->bus_regulator) {
|
||||
status = regulator_enable(adap->bus_regulator);
|
||||
if (status < 0) {
|
||||
dev_err(&adap->dev, "Failed to enable bus regulator\n");
|
||||
goto err_clear_wakeup_irq;
|
||||
}
|
||||
}
|
||||
|
||||
status = of_clk_set_defaults(dev->of_node, false);
|
||||
if (status < 0)
|
||||
goto err_clear_wakeup_irq;
|
||||
@@ -605,10 +595,8 @@ put_sync_adapter:
|
||||
static void i2c_device_remove(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct i2c_adapter *adap;
|
||||
struct i2c_driver *driver;
|
||||
|
||||
adap = client->adapter;
|
||||
driver = to_i2c_driver(dev->driver);
|
||||
if (driver->remove) {
|
||||
int status;
|
||||
@@ -623,8 +611,6 @@ static void i2c_device_remove(struct device *dev)
|
||||
devres_release_group(&client->dev, client->devres_group_id);
|
||||
|
||||
dev_pm_domain_detach(&client->dev, !i2c_acpi_waive_d0_probe(dev));
|
||||
if (!pm_runtime_status_suspended(&client->dev) && adap->bus_regulator)
|
||||
regulator_disable(adap->bus_regulator);
|
||||
|
||||
dev_pm_clear_wake_irq(&client->dev);
|
||||
device_init_wakeup(&client->dev, false);
|
||||
@@ -634,86 +620,6 @@ static void i2c_device_remove(struct device *dev)
|
||||
pm_runtime_put(&client->adapter->dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int i2c_resume_early(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
int err;
|
||||
|
||||
if (!client)
|
||||
return 0;
|
||||
|
||||
if (pm_runtime_status_suspended(&client->dev) &&
|
||||
client->adapter->bus_regulator) {
|
||||
err = regulator_enable(client->adapter->bus_regulator);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
return pm_generic_resume_early(&client->dev);
|
||||
}
|
||||
|
||||
static int i2c_suspend_late(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
int err;
|
||||
|
||||
if (!client)
|
||||
return 0;
|
||||
|
||||
err = pm_generic_suspend_late(&client->dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (!pm_runtime_status_suspended(&client->dev) &&
|
||||
client->adapter->bus_regulator)
|
||||
return regulator_disable(client->adapter->bus_regulator);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int i2c_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
int err;
|
||||
|
||||
if (!client)
|
||||
return 0;
|
||||
|
||||
if (client->adapter->bus_regulator) {
|
||||
err = regulator_enable(client->adapter->bus_regulator);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
return pm_generic_runtime_resume(&client->dev);
|
||||
}
|
||||
|
||||
static int i2c_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
int err;
|
||||
|
||||
if (!client)
|
||||
return 0;
|
||||
|
||||
err = pm_generic_runtime_suspend(&client->dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (client->adapter->bus_regulator)
|
||||
return regulator_disable(client->adapter->bus_regulator);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops i2c_device_pm = {
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(i2c_suspend_late, i2c_resume_early)
|
||||
SET_RUNTIME_PM_OPS(i2c_runtime_suspend, i2c_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static void i2c_device_shutdown(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = i2c_verify_client(dev);
|
||||
@@ -773,7 +679,6 @@ struct bus_type i2c_bus_type = {
|
||||
.probe = i2c_device_probe,
|
||||
.remove = i2c_device_remove,
|
||||
.shutdown = i2c_device_shutdown,
|
||||
.pm = &i2c_device_pm,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(i2c_bus_type);
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@ static void ltc2952_poweroff_kill(void)
|
||||
|
||||
static void ltc2952_poweroff_default(struct ltc2952_poweroff *data)
|
||||
{
|
||||
data->wde_interval = 300L * 1E6L;
|
||||
data->trigger_delay = ktime_set(2, 500L*1E6L);
|
||||
data->wde_interval = 300L * NSEC_PER_MSEC;
|
||||
data->trigger_delay = ktime_set(2, 500L * NSEC_PER_MSEC);
|
||||
|
||||
hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->timer_trigger.function = ltc2952_poweroff_timer_trigger;
|
||||
|
||||
@@ -581,12 +581,12 @@ static irqreturn_t __bq25890_handle_irq(struct bq25890_device *bq)
|
||||
|
||||
if (!new_state.online && bq->state.online) { /* power removed */
|
||||
/* disable ADC */
|
||||
ret = bq25890_field_write(bq, F_CONV_START, 0);
|
||||
ret = bq25890_field_write(bq, F_CONV_RATE, 0);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
} else if (new_state.online && !bq->state.online) { /* power inserted */
|
||||
/* enable ADC, to have control of charge current/voltage */
|
||||
ret = bq25890_field_write(bq, F_CONV_START, 1);
|
||||
ret = bq25890_field_write(bq, F_CONV_RATE, 1);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -931,6 +931,10 @@ power_supply_find_ocv2cap_table(struct power_supply_battery_info *info,
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < POWER_SUPPLY_OCV_TEMP_MAX; i++) {
|
||||
/* Out of capacity tables */
|
||||
if (!info->ocv_table[i])
|
||||
break;
|
||||
|
||||
temp_diff = abs(info->ocv_temp[i] - temp);
|
||||
|
||||
if (temp_diff < best_temp_diff) {
|
||||
|
||||
@@ -137,7 +137,12 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(dev, priv);
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
pm_runtime_resume_and_get(&pdev->dev);
|
||||
error = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (error < 0) {
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
reset_control_assert(priv->rstc);
|
||||
return dev_err_probe(&pdev->dev, error, "pm_runtime_resume_and_get failed");
|
||||
}
|
||||
|
||||
/* put pll and phy into reset state */
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
@@ -687,7 +687,8 @@ xfs_ioc_space(
|
||||
|
||||
if (bf->l_start > XFS_ISIZE(ip)) {
|
||||
error = xfs_alloc_file_space(ip, XFS_ISIZE(ip),
|
||||
bf->l_start - XFS_ISIZE(ip), 0);
|
||||
bf->l_start - XFS_ISIZE(ip),
|
||||
XFS_BMAPI_PREALLOC);
|
||||
if (error)
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user