Skip to content

Commit f5b6eb1

Browse files
committed
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "Some more bugfixes from I2C for v5.13. Usual stuff" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops i2c: qcom-geni: Add shutdown callback for i2c i2c: tegra-bpmp: Demote kernel-doc abuses i2c: altera: Fix formatting issue in struct and demote unworthy kernel-doc headers
2 parents e5220dd + 57648e8 commit f5b6eb1

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

drivers/i2c/busses/i2c-altera.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define ALTR_I2C_XFER_TIMEOUT (msecs_to_jiffies(250))
5656

5757
/**
58-
* altr_i2c_dev - I2C device context
58+
* struct altr_i2c_dev - I2C device context
5959
* @base: pointer to register struct
6060
* @msg: pointer to current message
6161
* @msg_len: number of bytes transferred in msg
@@ -172,7 +172,7 @@ static void altr_i2c_init(struct altr_i2c_dev *idev)
172172
altr_i2c_int_enable(idev, ALTR_I2C_ALL_IRQ, false);
173173
}
174174

175-
/**
175+
/*
176176
* altr_i2c_transfer - On the last byte to be transmitted, send
177177
* a Stop bit on the last byte.
178178
*/
@@ -185,7 +185,7 @@ static void altr_i2c_transfer(struct altr_i2c_dev *idev, u32 data)
185185
writel(data, idev->base + ALTR_I2C_TFR_CMD);
186186
}
187187

188-
/**
188+
/*
189189
* altr_i2c_empty_rx_fifo - Fetch data from RX FIFO until end of
190190
* transfer. Send a Stop bit on the last byte.
191191
*/
@@ -201,9 +201,8 @@ static void altr_i2c_empty_rx_fifo(struct altr_i2c_dev *idev)
201201
}
202202
}
203203

204-
/**
204+
/*
205205
* altr_i2c_fill_tx_fifo - Fill TX FIFO from current message buffer.
206-
* @return: Number of bytes left to transfer.
207206
*/
208207
static int altr_i2c_fill_tx_fifo(struct altr_i2c_dev *idev)
209208
{

drivers/i2c/busses/i2c-qcom-geni.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,14 @@ static int geni_i2c_remove(struct platform_device *pdev)
650650
return 0;
651651
}
652652

653+
static void geni_i2c_shutdown(struct platform_device *pdev)
654+
{
655+
struct geni_i2c_dev *gi2c = platform_get_drvdata(pdev);
656+
657+
/* Make client i2c transfers start failing */
658+
i2c_mark_adapter_suspended(&gi2c->adap);
659+
}
660+
653661
static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
654662
{
655663
int ret;
@@ -690,6 +698,8 @@ static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
690698
{
691699
struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
692700

701+
i2c_mark_adapter_suspended(&gi2c->adap);
702+
693703
if (!gi2c->suspended) {
694704
geni_i2c_runtime_suspend(dev);
695705
pm_runtime_disable(dev);
@@ -699,8 +709,16 @@ static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev)
699709
return 0;
700710
}
701711

712+
static int __maybe_unused geni_i2c_resume_noirq(struct device *dev)
713+
{
714+
struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
715+
716+
i2c_mark_adapter_resumed(&gi2c->adap);
717+
return 0;
718+
}
719+
702720
static const struct dev_pm_ops geni_i2c_pm_ops = {
703-
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, NULL)
721+
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq)
704722
SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume,
705723
NULL)
706724
};
@@ -714,6 +732,7 @@ MODULE_DEVICE_TABLE(of, geni_i2c_dt_match);
714732
static struct platform_driver geni_i2c_driver = {
715733
.probe = geni_i2c_probe,
716734
.remove = geni_i2c_remove,
735+
.shutdown = geni_i2c_shutdown,
717736
.driver = {
718737
.name = "geni_i2c",
719738
.pm = &geni_i2c_pm_ops,

drivers/i2c/busses/i2c-tegra-bpmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void tegra_bpmp_xlate_flags(u16 flags, u16 *out)
6565
*out |= SERIALI2C_RECV_LEN;
6666
}
6767

68-
/**
68+
/*
6969
* The serialized I2C format is simply the following:
7070
* [addr little-endian][flags little-endian][len little-endian][data if write]
7171
* [addr little-endian][flags little-endian][len little-endian][data if write]
@@ -109,7 +109,7 @@ static void tegra_bpmp_serialize_i2c_msg(struct tegra_bpmp_i2c *i2c,
109109
request->xfer.data_size = pos;
110110
}
111111

112-
/**
112+
/*
113113
* The data in the BPMP -> CPU direction is composed of sequential blocks for
114114
* those messages that have I2C_M_RD. So, for example, if you have:
115115
*

0 commit comments

Comments
 (0)