Re: [PATCH] ARM: s3c: simplify s3c_irqwake_{e,}intallow definition
On Monday 28 December 2015 10:02:57 Krzysztof Kozlowski wrote: > On 18.12.2015 23:45, Arnd Bergmann wrote: > > For a long time, gcc has warned about odd configurations on s3c64xx: > > > > In file included from arch/arm/plat-samsung/pm.c:34:0: > > arch/arm/mach-s3c64xx/include/mach/pm-core.h:61:0: warning: > > "s3c_irqwake_eintallow" redefined > > #define s3c_irqwake_eintallow ((1 << 28) - 1) > > In file included from arch/arm/plat-samsung/pm.c:33:0: > > arch/arm/plat-samsung/include/plat/pm.h:49:0: note: this is the location of > > the previous definition > > #define s3c_irqwake_eintallow 0 > > > > The definitions of s3c_irqwake_intallow and s3c_irqwake_eintallow are a bit > > consistent > > between the various platforms. Things have become easier now that it's only > > s3c24xx > > and s3c64xx that use them at all, so I've tried to rearrange the > > definitions to > > make it more obvious what is going on. > > > > Signed-off-by: Arnd Bergmann> > --- > > This fixes a very old and harmless warning, please apply to a cleanup branch > > if you agree. > > > > Looks correct and makes sense. Hoping you compiled it on all machs: > > Reviewed-by: Krzysztof Kozlowski I built many thousand kernels with this patch, but also had other patches applied at the same time, notably the s3c64xx multiplatform series, so I can make a reasonable assumption that I'm not introducing regressions, unless it relies on something else I have queued up and not yet sent. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] call media_device_init() before registering the V4L2 device
Currently, v4l2_device_register() doesn't use the media_device struct. So, calling media_device_init() could be called either before or after v4l2_device_register(). Yet, it is a good practice to initialize everything before calling the register functions. Also, the other drivers call media_device_init() before registering the V4L2 device. So, move the call for media_device_init() to happen earlier on exynos4-is and s3c-camif. This is just a cleanup patch. Signed-off-by: Mauro Carvalho Chehab--- drivers/media/platform/exynos4-is/media-dev.c | 4 ++-- drivers/media/platform/s3c-camif/camif-core.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 27663dd45294..e96d246043ad 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -1347,14 +1347,14 @@ static int fimc_md_probe(struct platform_device *pdev) fmd->use_isp = fimc_md_is_isp_available(dev->of_node); fmd->user_subdev_api = true; + media_device_init(>media_dev); + ret = v4l2_device_register(dev, >v4l2_dev); if (ret < 0) { v4l2_err(v4l2_dev, "Failed to register v4l2_device: %d\n", ret); return ret; } - media_device_init(>media_dev); - ret = fimc_md_get_clocks(fmd); if (ret) goto err_md; diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index ea02b7ef2119..0b44b9accf50 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c @@ -324,12 +324,12 @@ static int camif_media_dev_init(struct camif_dev *camif) strlcpy(v4l2_dev->name, "s3c-camif", sizeof(v4l2_dev->name)); v4l2_dev->mdev = md; - ret = v4l2_device_register(camif->dev, v4l2_dev); - if (ret < 0) - return ret; - media_device_init(md); + ret = v4l2_device_register(camif->dev, v4l2_dev); + if (ret < 0) + return ret; + return ret; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] mfd: use to_i2c_client
Use to_i2c_client() instead of open-coding it. Signed-off-by: Geliang Tang--- drivers/mfd/88pm80x.c | 4 ++-- drivers/mfd/88pm860x-core.c | 4 ++-- drivers/mfd/max14577.c | 4 ++-- drivers/mfd/max77686.c | 4 ++-- drivers/mfd/max77693.c | 4 ++-- drivers/mfd/max77843.c | 4 ++-- drivers/mfd/max8925-i2c.c | 4 ++-- drivers/mfd/max8997.c | 8 drivers/mfd/max8998.c | 8 drivers/mfd/sec-core.c | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c index 63445ea..3f24ecb 100644 --- a/drivers/mfd/88pm80x.c +++ b/drivers/mfd/88pm80x.c @@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(pm80x_deinit); #ifdef CONFIG_PM_SLEEP static int pm80x_suspend(struct device *dev) { - struct i2c_client *client = container_of(dev, struct i2c_client, dev); + struct i2c_client *client = to_i2c_client(dev); struct pm80x_chip *chip = i2c_get_clientdata(client); if (chip && chip->wu_flag) @@ -147,7 +147,7 @@ static int pm80x_suspend(struct device *dev) static int pm80x_resume(struct device *dev) { - struct i2c_client *client = container_of(dev, struct i2c_client, dev); + struct i2c_client *client = to_i2c_client(dev); struct pm80x_chip *chip = i2c_get_clientdata(client); if (chip && chip->wu_flag) diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 3269a99..e497cee 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -1218,7 +1218,7 @@ static int pm860x_remove(struct i2c_client *client) #ifdef CONFIG_PM_SLEEP static int pm860x_suspend(struct device *dev) { - struct i2c_client *client = container_of(dev, struct i2c_client, dev); + struct i2c_client *client = to_i2c_client(dev); struct pm860x_chip *chip = i2c_get_clientdata(client); if (device_may_wakeup(dev) && chip->wakeup_flag) @@ -1228,7 +1228,7 @@ static int pm860x_suspend(struct device *dev) static int pm860x_resume(struct device *dev) { - struct i2c_client *client = container_of(dev, struct i2c_client, dev); + struct i2c_client *client = to_i2c_client(dev); struct pm860x_chip *chip = i2c_get_clientdata(client); if (device_may_wakeup(dev) && chip->wakeup_flag) diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 56e216d..2280b3f 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -495,7 +495,7 @@ MODULE_DEVICE_TABLE(i2c, max14577_i2c_id); #ifdef CONFIG_PM_SLEEP static int max14577_suspend(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max14577 *max14577 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) @@ -516,7 +516,7 @@ static int max14577_suspend(struct device *dev) static int max14577_resume(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max14577 *max14577 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index d19be64..d959ebb 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c @@ -352,7 +352,7 @@ MODULE_DEVICE_TABLE(i2c, max77686_i2c_id); #ifdef CONFIG_PM_SLEEP static int max77686_suspend(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max77686_dev *max77686 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) @@ -374,7 +374,7 @@ static int max77686_suspend(struct device *dev) static int max77686_resume(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max77686_dev *max77686 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c index 007f729..b83b7a7 100644 --- a/drivers/mfd/max77693.c +++ b/drivers/mfd/max77693.c @@ -334,7 +334,7 @@ MODULE_DEVICE_TABLE(i2c, max77693_i2c_id); static int max77693_suspend(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max77693_dev *max77693 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) { @@ -347,7 +347,7 @@ static int max77693_suspend(struct device *dev) static int max77693_resume(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct max77693_dev *max77693 = i2c_get_clientdata(i2c); if (device_may_wakeup(dev)) { diff --git a/drivers/mfd/max77843.c
Re: [PATCH 2/2] [media] media-device: split media initialization and registration
Em Mon, 28 Dec 2015 08:26:33 -0200 Mauro Carvalho Chehabescreveu: > Em Mon, 28 Dec 2015 03:14:53 +0200 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Tue, Dec 15, 2015 at 09:13:42AM -0200, Mauro Carvalho Chehab wrote: > > > Em Thu, 10 Sep 2015 20:14:04 +0300 > > > Sakari Ailus escreveu: > > > > > > > Hi Javier, > > > > > > > > Thanks for the set! A few comments below. > > > > > > > > Javier Martinez Canillas wrote: > > > > > The media device node is registered and so made visible to user-space > > > > > before entities are registered and links created which means that the > > > > > media graph obtained by user-space could be only partially enumerated > > > > > if that happens too early before all the graph has been created. > > > > > > > > > > To avoid this race condition, split the media init and registration > > > > > in separate functions and only register the media device node when > > > > > all the pending subdevices have been registered, either explicitly > > > > > by the driver or asynchronously using v4l2_async_register_subdev(). > > > > > > > > > > Also, add a media_entity_cleanup() function that will destroy the > > > > > graph_mutex that is initialized in media_entity_init(). > > > > > > > > > > Suggested-by: Sakari Ailus > > > > > Signed-off-by: Javier Martinez Canillas > > > > > > > > > > --- > > > > > > > > > > drivers/media/common/siano/smsdvb-main.c | 1 + > > > > > drivers/media/media-device.c | 38 > > > > > +++ > > > > > drivers/media/platform/exynos4-is/media-dev.c | 12 ++--- > > > > > drivers/media/platform/omap3isp/isp.c | 11 +--- > > > > > drivers/media/platform/s3c-camif/camif-core.c | 13 ++--- > > > > > drivers/media/platform/vsp1/vsp1_drv.c| 19 ++ > > > > > drivers/media/platform/xilinx/xilinx-vipp.c | 11 +--- > > > > > drivers/media/usb/au0828/au0828-core.c| 26 +- > > > > > drivers/media/usb/cx231xx/cx231xx-cards.c | 22 +++- > > > > > drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 11 +--- > > > > > drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 13 ++--- > > > > > drivers/media/usb/siano/smsusb.c | 14 -- > > > > > drivers/media/usb/uvc/uvc_driver.c| 9 +-- > > > > > include/media/media-device.h | 2 ++ > > > > > 14 files changed, 156 insertions(+), 46 deletions(-) > > > > > > > > > > diff --git a/drivers/media/common/siano/smsdvb-main.c > > > > > b/drivers/media/common/siano/smsdvb-main.c > > > > > index ab345490a43a..8a1ea2192439 100644 > > > > > --- a/drivers/media/common/siano/smsdvb-main.c > > > > > +++ b/drivers/media/common/siano/smsdvb-main.c > > > > > @@ -617,6 +617,7 @@ static void smsdvb_media_device_unregister(struct > > > > > smsdvb_client_t *client) > > > > > if (!coredev->media_dev) > > > > > return; > > > > > media_device_unregister(coredev->media_dev); > > > > > + media_device_cleanup(coredev->media_dev); > > > > > kfree(coredev->media_dev); > > > > > coredev->media_dev = NULL; > > > > > #endif > > > > > diff --git a/drivers/media/media-device.c > > > > > b/drivers/media/media-device.c > > > > > index 745defb34b33..a8beb0b445a6 100644 > > > > > --- a/drivers/media/media-device.c > > > > > +++ b/drivers/media/media-device.c > > > > > @@ -526,7 +526,7 @@ static void media_device_release(struct > > > > > media_devnode *mdev) > > > > > } > > > > > > > > > > /** > > > > > - * media_device_register - register a media device > > > > > + * media_device_init() - initialize a media device > > > > > * @mdev:The media device > > > > > * > > > > > * The caller is responsible for initializing the media device before > > > > > @@ -534,12 +534,11 @@ static void media_device_release(struct > > > > > media_devnode *mdev) > > > > > * > > > > > * - dev must point to the parent device > > > > > * - model must be filled with the device model name > > > > > + * > > > > > + * returns zero on success or a negative error code. > > > > > */ > > > > > -int __must_check __media_device_register(struct media_device *mdev, > > > > > - struct module *owner) > > > > > +int __must_check media_device_init(struct media_device *mdev) > > > > > > > > I think I suggested making media_device_init() return void as the only > > > > remaining source of errors would be driver bugs. > > > > > > > > I'd simply replace the WARN_ON() below with BUG(). > > > > > > That sounds like bad idea to me, and it is against the current > > > Kernel policy of using BUG() only when there's no other way, e. g. on > > > event so severe that the Kernel has no other thing to do except to > > > stop running. > > > > > > For sure, this is not the case here. Also,
Re: [PATCH v3 1/7] drm/exynos: rename zpos to index
Hello, On 2015-12-24 09:15, Inki Dae wrote: Seems this patch could be more cleaned up. Each ctx object of each crtc driver has its own plane config object which includes already zpos value. So I think we wouldn't need to keep zpos of the plane config and index of the plane object. How about removing index from exynos plane structure and using zpos of exynos plane config structure instead? Below patch can be applied on top of your patch, If you want I can move 'index' entry to config object, but the initial zpos value should also be there. Please note that index is not always equal to the initial zpos and having initial zpos configurable is also needed. There were already concerns if mixer's dedicated video plane should be below or above the primary gfx plane in the default configuration. > (...) Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL] ARM: EXYNOS: dts: DeviceTree for v4.5, 2nd try
Hi, This is an updated pull request, without the Exynos5410 DTS pinctrl changes. I am still not sure why they have to be acked separately but I do not want to hold on the changes because of this. However if the pinctrl commit is okay, then please pull tag 'tags/samsung-dt-4.5' instead. This contains the dependency: SSS clock for Exynos4, acked by Stephen Boyd (tag: 'samsung-clk-exynos4-4.5'). Best regards, Krzysztof The following changes since commit 8005c49d9aea74d382f474ce11afbbc7d7130bec: Linux 4.4-rc1 (2015-11-15 17:00:27 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/samsung-dt-4.5-2 for you to fetch changes up to bf0dda345b0ee1af287f043857fc34ecfa206293: ARM: dts: Unify G2D device node with other devices on exynos4 (2015-12-29 09:07:44 +0900) Samsung DeviceTree updates and improvements for 4.5 1. eMMC/SDIO minor fixes usage of bindings on Snow and Peach Chromebooks. 2. Remove FIMD from Odroid XU3-family because on XU3 it cannot be used yet and on XU3-Lite and XU4 it is not supported. 3. Remove deprecated since June 2013 samsung,exynos5-hdmi. 4. Add support for Pseudo Random Generator on Exynos4 (Trats2 for now). This depends on new SSS clock. 5. Add rotator nodes for Exynos4 and Exynos5. 6. Switch DWC3_1 on Odroid XU3 and XU3-Lite to peripheral mode because now it cannot be used as OTG. 7. Cleanup the G2D usage on Exynos4 and add it to a proper domain in case of Exynos4210. 8. Put MDMA1 in proper domain on Exynos4210 as well. 9. Minor cleanups. Andrzej Hajda (1): dt-bindings: remove deprecated compatible string from exynos-hdmi Javier Martinez Canillas (7): ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common ARM: dts: Remove broken-cd from eMMC node in exynos5800-peach-pi ARM: dts: Remove broken-cd from eMMC node in exynos5420-peach-pi ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common ARM: dts: Remove unneeded GPIO include in exynos4412-odroidu3 Krzysztof Kozlowski (4): clk: samsung: exynos4: Add SSS gate clock Merge tag 'samsung-clk-exynos4-4.5' into next/dt ARM: dts: Add PRNG module for exynos4 ARM: dts: Enable PRNG module on exynos4412-trats2 Marek Szyprowski (10): ARM: dts: Remove fimd node from exynos5422-odroidxu3-common ARM: dts: Add rotator nodes on exynos4 ARM: dts: Fix power domain for sysmmu-rotator device on exynos4 ARM: dts: Add rotator node on exynos5250 ARM: dts: Add rotator node on exynos5420 ARM: dts: Use peripheral mode for dwc3_1 on exynos5422-odroidxu3 ARM: dts: exynos4210-universal_c210: Disable DMA for UARTs ARM: dts: MDMA1 device belongs to LCD0 power domain on exynos4210 ARM: dts: Add power domain to G2D device on exynos4210 ARM: dts: Unify G2D device node with other devices on exynos4 .../bindings/display/exynos/exynos_hdmi.txt | 7 +++ arch/arm/boot/dts/exynos4.dtsi| 18 +- arch/arm/boot/dts/exynos4210-origen.dts | 4 arch/arm/boot/dts/exynos4210-smdkv310.dts | 4 arch/arm/boot/dts/exynos4210-universal_c210.dts | 8 arch/arm/boot/dts/exynos4210.dtsi | 14 +- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 arch/arm/boot/dts/exynos4412-odroidu3.dts | 1 - arch/arm/boot/dts/exynos4412-origen.dts | 4 arch/arm/boot/dts/exynos4412-smdk4412.dts | 4 arch/arm/boot/dts/exynos4412-trats2.dts | 4 arch/arm/boot/dts/exynos4x12.dtsi | 5 - arch/arm/boot/dts/exynos5250-snow-common.dtsi | 6 ++ arch/arm/boot/dts/exynos5250.dtsi | 9 + arch/arm/boot/dts/exynos5420-peach-pit.dts| 5 + arch/arm/boot/dts/exynos5420.dtsi | 19 +++ arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi| 5 - arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 2 +- arch/arm/boot/dts/exynos5422-odroidxu3.dts| 2 +- arch/arm/boot/dts/exynos5800-peach-pi.dts | 5 + drivers/clk/samsung/clk-exynos4.c | 1 + include/dt-bindings/clock/exynos4.h | 1 + 22 files changed, 85 insertions(+), 47 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] mfd: use to_i2c_client
On 29.12.2015 00:00, Geliang Tang wrote: > Use to_i2c_client() instead of open-coding it. > > Signed-off-by: Geliang Tang> --- > drivers/mfd/88pm80x.c | 4 ++-- > drivers/mfd/88pm860x-core.c | 4 ++-- > drivers/mfd/max14577.c | 4 ++-- > drivers/mfd/max77686.c | 4 ++-- > drivers/mfd/max77693.c | 4 ++-- > drivers/mfd/max77843.c | 4 ++-- > drivers/mfd/max8925-i2c.c | 4 ++-- > drivers/mfd/max8997.c | 8 > drivers/mfd/max8998.c | 8 > drivers/mfd/sec-core.c | 4 ++-- > 10 files changed, 24 insertions(+), 24 deletions(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] mfd: use to_i2c_client
Hi Geliang, On 2015년 12월 29일 00:00, Geliang Tang wrote: > Use to_i2c_client() instead of open-coding it. > > Signed-off-by: Geliang Tang> --- > drivers/mfd/88pm80x.c | 4 ++-- > drivers/mfd/88pm860x-core.c | 4 ++-- > drivers/mfd/max14577.c | 4 ++-- > drivers/mfd/max77686.c | 4 ++-- > drivers/mfd/max77693.c | 4 ++-- > drivers/mfd/max77843.c | 4 ++-- > drivers/mfd/max8925-i2c.c | 4 ++-- > drivers/mfd/max8997.c | 8 > drivers/mfd/max8998.c | 8 > drivers/mfd/sec-core.c | 4 ++-- > 10 files changed, 24 insertions(+), 24 deletions(-) Reviewed-by: Chanwoo Choi Thanks, Chanwoo Choi [snip] -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html