diff mbox

[v4,2/2] iio: accel: mma8452: Rename config structs for readability

Message ID 1509904804-4608-3-git-send-email-harinath922@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Harinath Nampally Nov. 5, 2017, 6 p.m. UTC
Rename structs holding event configuration registers
to more appropriate names. This naming is consistent
with the event config register names given in the
mma845x and fxls8471 datasheets.

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
---
 v4:
 Shorter subject line and better description in commit message

 drivers/iio/accel/mma8452.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Martin Kepplinger-Novakovic Nov. 5, 2017, 8:36 p.m. UTC | #1
On 2017-11-05 19:00, Harinath Nampally wrote:
> Rename structs holding event configuration registers
> to more appropriate names. This naming is consistent
> with the event config register names given in the
> mma845x and fxls8471 datasheets.
> 
> Signed-off-by: Harinath Nampally <harinath922@gmail.com>

Makes sense to me.

Acked-by: Martin Kepplinger <martink@posteo.de>


Hey Harinath,

I think it'd be great to have the "power_mode" iio ABI interface
for mma8452 too, and I just found an old patch pf mine for this.

If you say you could test it and check for correct API usage and
ABI provisioning in sysfs, I'd be happy to publish it for you to
make any necessary corrections and submit it after testing.

Do we have a deal?

thanks

                             martin
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Harinath Nampally Nov. 6, 2017, 1:04 a.m. UTC | #2
Hi Martin,

> I think it'd be great to have the "power_mode" iio ABI interface
> for mma8452 too, and I just found an old patch pf mine for this.
>
> If you say you could test it and check for correct API usage and
> ABI provisioning in sysfs, I'd be happy to publish it for you to
> make any necessary corrections and submit it after testing.
>
> Do we have a deal?
Sure, sounds great!

Thanks,
Harinath

On Sun, Nov 5, 2017 at 3:36 PM, Martin Kepplinger <martink@posteo.de> wrote:
> On 2017-11-05 19:00, Harinath Nampally wrote:
>> Rename structs holding event configuration registers
>> to more appropriate names. This naming is consistent
>> with the event config register names given in the
>> mma845x and fxls8471 datasheets.
>>
>> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
>
> Makes sense to me.
>
> Acked-by: Martin Kepplinger <martink@posteo.de>
>
>
> Hey Harinath,
>
> I think it'd be great to have the "power_mode" iio ABI interface
> for mma8452 too, and I just found an old patch pf mine for this.
>
> If you say you could test it and check for correct API usage and
> ABI provisioning in sysfs, I'd be happy to publish it for you to
> make any necessary corrections and submit it after testing.
>
> Do we have a deal?
>
> thanks
>
>                              martin
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron Nov. 19, 2017, 2:59 p.m. UTC | #3
On Sun, 5 Nov 2017 21:36:01 +0100
Martin Kepplinger <martink@posteo.de> wrote:

> On 2017-11-05 19:00, Harinath Nampally wrote:
> > Rename structs holding event configuration registers
> > to more appropriate names. This naming is consistent
> > with the event config register names given in the
> > mma845x and fxls8471 datasheets.
> > 
> > Signed-off-by: Harinath Nampally <harinath922@gmail.com>  
> 
> Makes sense to me.
> 
> Acked-by: Martin Kepplinger <martink@posteo.de>
> 

Applied.  Thanks,

Jonathan
> 
> Hey Harinath,
> 
> I think it'd be great to have the "power_mode" iio ABI interface
> for mma8452 too, and I just found an old patch pf mine for this.
> 
> If you say you could test it and check for correct API usage and
> ABI provisioning in sysfs, I'd be happy to publish it for you to
> make any necessary corrections and submit it after testing.
> 
> Do we have a deal?
> 
> thanks
> 
>                              martin

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 16adf47..43c3a6b 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -135,7 +135,7 @@  struct mma8452_event_regs {
 		u8 ev_count;
 };
 
-static const struct mma8452_event_regs ev_regs_accel_falling = {
+static const struct mma8452_event_regs ff_mt_ev_regs = {
 		.ev_cfg = MMA8452_FF_MT_CFG,
 		.ev_cfg_ele = MMA8452_FF_MT_CFG_ELE,
 		.ev_cfg_chan_shift = MMA8452_FF_MT_CHAN_SHIFT,
@@ -145,7 +145,7 @@  static const struct mma8452_event_regs ev_regs_accel_falling = {
 		.ev_count = MMA8452_FF_MT_COUNT
 };
 
-static const struct mma8452_event_regs ev_regs_accel_rising = {
+static const struct mma8452_event_regs trans_ev_regs = {
 		.ev_cfg = MMA8452_TRANSIENT_CFG,
 		.ev_cfg_ele = MMA8452_TRANSIENT_CFG_ELE,
 		.ev_cfg_chan_shift = MMA8452_TRANSIENT_CHAN_SHIFT,
@@ -777,12 +777,12 @@  static int mma8452_get_event_regs(struct mma8452_data *data,
 					& MMA8452_INT_TRANS) &&
 				(data->chip_info->enabled_events
 					& MMA8452_INT_TRANS))
-				*ev_reg = &ev_regs_accel_rising;
+				*ev_reg = &trans_ev_regs;
 			else
-				*ev_reg = &ev_regs_accel_falling;
+				*ev_reg = &ff_mt_ev_regs;
 			return 0;
 		case IIO_EV_DIR_FALLING:
-			*ev_reg = &ev_regs_accel_falling;
+			*ev_reg = &ff_mt_ev_regs;
 			return 0;
 		default:
 			return -EINVAL;