Re: [PATCH 08/12] hdaps: Add explicit hardware configuration functions

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

 



Hi!

> This adds functions for configuring accelerometer-related hardware 
> parameters in the hdaps driver, and changes the init function to
> use these functions instead of opaque magic numbers.
> The parameters are configured via variables instead of constants
> since a later patch will add sysfs attributes for changing them.
> 
> A few of these functions aren't used yet, but will be used by later
> patches.
> 
> Signed-off-by: Shem Multinymous <[email protected]>

Signed-off-by: Pavel Machek <[email protected]>

> @@ -68,6 +67,13 @@ static struct input_dev *hdaps_idev;
>  static unsigned int hdaps_invert;
>  static int needs_calibration = 0;

Unneccessary initializer.

> +/* Configuration: */
> +static int sampling_rate = 50;       /* Sampling rate  */
> +static int oversampling_ratio = 5;   /* Ratio between our sampling rate and 
> +                                      * EC accelerometer sampling rate      */
> +static int running_avg_filter_order = 2; /* EC running average filter order */
> +static int fake_data_mode = 0;       /* Enable EC fake data mode? */

Here too.

> @@ -162,6 +168,137 @@ static int hdaps_update(void)
>  }
>  
>  /*
> + * hdaps_set_power - enable or disable power to the accelerometer.
> + * Returns zero on success and negative error code on failure.  Can sleep.
> + */
> +static int hdaps_set_power(int on) {

{ on new line, kernel-doc.

> +/*
> + * hdaps_set_fake_data_mode - enable or disable EC test mode, which fakes 
> + * accelerometer data using an incrementing counter.
> + * Returns zero on success and negative error code on failure.  Can sleep.
> + */

Why do we want to have fake mode? I see it is useful for debugging,
but?

> +/*
> + * hdaps_check_ec - checks something about the EC.
> + * Follows the clean-room spec for HDAPS; we don't know what it means.
> + * Returns zero on success and negative error code on failure.  Can sleep.
> + */

URL for spec?

What happens when we delete this one?

						Pavel
-- 
Thanks for all the (sleeping) penguins.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux