Re: [PATCH 01/11] usb: chipidea: Add power management support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Peter Chen wrote:
> This commit adds runtime and system power management support for
> chipidea core. The runtime pm support is controlled by glue
> layer, it can be enabled by flag CI_HDRC_SUPPORTS_RUNTIME_PM.
> 
[...]
> +#ifdef CONFIG_PM
> +static int ci_controller_suspend(struct device *dev)
> +{
> +	struct ci_hdrc *ci = dev_get_drvdata(dev);
> +
> +	dev_dbg(dev, "at %s\n", __func__);
> +
> +	if (atomic_read(&ci->in_lpm))
> +		return 0;
> +
What does this 'atomic_read()' buy you over just testing/assinging a
simple integer. Note that just because the function has 'atomic' in
its name the sequence:
	atomic_read();
...
	atomic_set();
does not magically become an atomic operation.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@xxxxxxxxxxxxxxxxxxx
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux