iio: accel: mma9553: check input value for activity period
iio: accel: mma9553: check input value for activity period

When setting the activity period, the value introduced by
the user in sysfs is not checked for validity.

Add a boundary check so that only allowed values are
reported as successfully written to device.

Signed-off-by: Irina Tirdea <756d90dbe30c1aa83b724b214803f9c992482927@intel.com>
Reported-by: Hartmut Knaack <4bccb8448924141fc676c25eb657b52ee47a361d@gmx.de>
Signed-off-by: Jonathan Cameron <09f65b71b7655725897b2fd41a09a0cefe2e1ace@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs