Commit Graph

16 Commits

Author SHA1 Message Date
Shengjiu Wang 5504d2877a MLK-22355: mfd: si476x: Use system_freezable_wq instead of system_wq
There is issue that system can't enter suspend while the si476x is
working.

The reason is that with the workqueue thread is still working after
i2c enter suspend, then cause the cpu_suspend function failed.

This patch is to use the system_freezable_wq instead of the system_wq,
that the workqueue will be freeze before system enter suspend.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2019-11-25 15:54:32 +08:00
Shengjiu Wang 49e5b31740 MLK-10055-2: mfd: si476x-i2c: sound is registered when no FM module attached
The si476x_core_get_revision_info will send i2c command to FM module, if it
return error, there is no FM modules attached, so we need't to register the
sound card. otherwise, the pulseaudio will access this sound card, but
return a lot of i2c error.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 4c8e9916128f05f9b4115e1ee1af4a1e7d800c4a)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2019-11-25 15:54:32 +08:00
Zidan Wang c0195d1455 MLK-10038-1: mfd: si476x-i2c: Add support of si476x-rev4.0 board
Currently, si476x-rev1.0 and si476x-rev4.0 board just support A10
compatible command set. For si476x-rev1.0 board, its firmware revision is
unsupported and will revert to A10 compatible function. For si476x-rev4.0
board, its firmware revision is two and will use A30 function, but A30
command set function can't work for the rev4.0 board.
So make the command set configurable in dts. If "revision-a10" is present,
set the revision to SI476X_REVISION_A10 to use A10 compatible commit set.
Otherwise, get the revision from si476x register.

Signed-off-by: Zidan Wang <b50113@freescale.com>
(cherry picked from commit b648714c3b71ee084188ae04b1e6a6f2554fe2cb)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2019-11-25 15:54:31 +08:00
Shengjiu Wang 73a126450a MLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec
Add of_compatible for si476x-codec, then si476x-codec driver will have
codec_of_node, So machine driver can use the codec_of_node.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e2ec44f91a21b127e155e8317d06e8ead7fd2678)
(cherry picked from commit ac6decaf5414e784ae81a524edc2f32060061b59)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2019-11-25 15:54:31 +08:00
Nicolin Chen 78490823a1 MLK-11429-23: mfd: si476x: Use default configuration when no platform data
cherry-pick below patch from imx_3.14.y
ENGR00276567-6 mfd: si476x: Use default configuration when no platform data

This would allow the driver to work normally without specific platform
data, when using devicetree for example.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 23e369b88b546d7b699ca9ec46e195a05c61b717)
(cherry picked from commit a2449e1d303e341f32556fb7f4ebc7dcbdd9ead1)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2019-11-25 15:54:30 +08:00
Nicolin Chen ecfadb7f27 MLK-11429-22: mfd: si476x: Fix power up failure
cherry-pick below patch from imx_3.14.y
ENGR00276567-4 mfd: si476x: Fix power up failure

This's some logical error in power-up code, thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 77d97ad1bb77c0e3c60b9781a06b61d4b4667de1)
(cherry picked from commit b656522da2685ef9a4da2229b6786d5cd0c12189)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25 15:54:29 +08:00
Thomas Gleixner 8e8e69d67e treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 100 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.918357685@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Markus Elfring a9241b0921 mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe()
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-05-16 09:21:48 +01:00
Colin Ian King d4c55da236 mfd: si476x-i2c: Fix spelling mistakes "Failet" and "gett"
Trivial spelling mistake fixes in dev_err message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-11-29 08:21:29 +00:00
Colin Ian King 521d93579f mfd: si476x-i2c: Fix spelling mistake "comptible" -> "compatible"
trivial fix to spelling mistake in dev_err message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-06-29 10:14:31 +01:00
Krzysztof Kozlowski 0e777366fb mfd: Drop owner assignment from i2c_drivers
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-11 15:08:48 +01:00
Fabio Estevam ef76cc5bae mfd: si476x-i2c: Pass the IRQF_ONESHOT flag
Since commit 1c6c69525b ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22 12:25:29 +01:00
Masanari Iida f42cf8d6a3 treewide: Fix typo in printk messages
This patch fix spelling typo in printk messages.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-03-06 23:04:40 +01:00
Jingoo Han 334a41ce9b mfd: Use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-07-31 13:01:29 +01:00
Hans Verkuil 4adedc57e0 mfd: si476x: Fix i2c warning
drivers/mfd/si476x-i2c.c: In function ‘si476x_core_drain_rds_fifo’:
drivers/mfd/si476x-i2c.c:391:4: warning: field width specifier ‘*’ expects
+argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat]

Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-19 18:40:05 +02:00
Andrey Smirnov 730a30ab7f mfd: si476x: Add the bulk of the core driver
This patch adds main part(out of three) of the I2C driver for the
"core" of MFD device.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-19 18:37:39 +02:00