First set of Counter updates for the 6.6 cycle
This set consists primarily of minor clean-ups. The counter_priv() 'const' attribute change does yield a small improvement in reducing the binary size. Changes * rz-mtu3-cnt - Reorder locking sequence for consistency * Documentation - sysfs-bus-counter: Fix indentation * counter - Declare counter_priv() to be const * microchip-tcb-capture - Explicitly include correct DT includes -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZN+bCQAKCRC1SFbKvhIj K9X9AQCJJKkhUtsB8Q0NqfFWbNynLoKZAN5b+jzXM6x8wcoyqAD9F8mblAz80YG7 8XIZXH9DkFKknfeRVOHEBlPFx1vpDws= =dpP8 -----END PGP SIGNATURE----- Merge tag 'counter-updates-for-6.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: First set of Counter updates for the 6.6 cycle This set consists primarily of minor clean-ups. The counter_priv() 'const' attribute change does yield a small improvement in reducing the binary size. Changes * rz-mtu3-cnt - Reorder locking sequence for consistency * Documentation - sysfs-bus-counter: Fix indentation * counter - Declare counter_priv() to be const * microchip-tcb-capture - Explicitly include correct DT includes * tag 'counter-updates-for-6.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: rz-mtu3-cnt: Reorder locking sequence for consistency Documentation: ABI: sysfs-bus-counter: Fix indentation counter: Declare counter_priv() to be const counter: Explicitly include correct DT includes
This commit is contained in:
commit
a65ce15718
|
@ -22,11 +22,11 @@ Description:
|
|||
phase clock.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_available
|
||||
KernelVersion: 6.4
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
KernelVersion: 6.4
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Discrete set of available values for the respective device
|
||||
configuration are listed in this file.
|
||||
Discrete set of available values for the respective device
|
||||
configuration are listed in this file.
|
||||
|
||||
What: /sys/bus/counter/devices/counterX/countY/count
|
||||
KernelVersion: 5.2
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <soc/at91/atmel_tcb.h>
|
||||
|
|
|
@ -500,8 +500,8 @@ static int rz_mtu3_count_enable_write(struct counter_device *counter,
|
|||
int ret = 0;
|
||||
|
||||
if (enable) {
|
||||
pm_runtime_get_sync(ch->dev);
|
||||
mutex_lock(&priv->lock);
|
||||
pm_runtime_get_sync(ch->dev);
|
||||
ret = rz_mtu3_initialize_counter(counter, count->id);
|
||||
if (ret == 0)
|
||||
priv->count_is_enabled[count->id] = true;
|
||||
|
@ -510,8 +510,8 @@ static int rz_mtu3_count_enable_write(struct counter_device *counter,
|
|||
mutex_lock(&priv->lock);
|
||||
rz_mtu3_terminate_counter(counter, count->id);
|
||||
priv->count_is_enabled[count->id] = false;
|
||||
mutex_unlock(&priv->lock);
|
||||
pm_runtime_put(ch->dev);
|
||||
mutex_unlock(&priv->lock);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -399,7 +399,7 @@ struct counter_device {
|
|||
struct mutex ops_exist_lock;
|
||||
};
|
||||
|
||||
void *counter_priv(const struct counter_device *const counter);
|
||||
void *counter_priv(const struct counter_device *const counter) __attribute_const__;
|
||||
|
||||
struct counter_device *counter_alloc(size_t sizeof_priv);
|
||||
void counter_put(struct counter_device *const counter);
|
||||
|
|
Loading…
Reference in New Issue