Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: iqs7222 - set all ULP entry masks by default

Some devices expose an ultra-low-power (ULP) mode entry mask for
each channel. If the mask is set, the device cannot enter ULP so
long as the corresponding channel remains in an active state.

The vendor has advised setting the mask for any disabled channel.
To accommodate this suggestion, initially set all masks and then
clear them only if specified in the device tree.

Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20220908131548.48120-8-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jeff LaBundy and committed by
Dmitry Torokhov
d56111ed 514c13b1

+6 -5
+6 -5
drivers/input/misc/iqs7222.c
··· 1771 1771 if (!chan_node) 1772 1772 return 0; 1773 1773 1774 - if (dev_desc->allow_offset) { 1775 - sys_setup[dev_desc->allow_offset] |= BIT(chan_index); 1776 - if (fwnode_property_present(chan_node, "azoteq,ulp-allow")) 1777 - sys_setup[dev_desc->allow_offset] &= ~BIT(chan_index); 1778 - } 1774 + if (dev_desc->allow_offset && 1775 + fwnode_property_present(chan_node, "azoteq,ulp-allow")) 1776 + sys_setup[dev_desc->allow_offset] &= ~BIT(chan_index); 1779 1777 1780 1778 chan_setup[0] |= IQS7222_CHAN_SETUP_0_CHAN_EN; 1781 1779 ··· 2203 2205 const struct iqs7222_reg_grp_desc *reg_grps = dev_desc->reg_grps; 2204 2206 u16 *sys_setup = iqs7222->sys_setup; 2205 2207 int error, i; 2208 + 2209 + if (dev_desc->allow_offset) 2210 + sys_setup[dev_desc->allow_offset] = U16_MAX; 2206 2211 2207 2212 if (dev_desc->event_offset) 2208 2213 sys_setup[dev_desc->event_offset] = IQS7222_EVENT_MASK_ATI;