* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-20 4:59 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-20 4:59 UTC (permalink / raw)
To: dmitry.torokhov, linux, rmk+kernel
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, linux-input,
linux-i2c, rmk, Mohan Pallaka
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..54877f6 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_HAVE_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+#endif /* CONFIG_HAVE_PWM */
#endif /* __LINUX_PWM_H */
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-20 4:59 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-20 4:59 UTC (permalink / raw)
To: linux-arm-kernel
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..54877f6 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_HAVE_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+#endif /* CONFIG_HAVE_PWM */
#endif /* __LINUX_PWM_H */
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] pwm: Add stubs for pwm operations
2011-05-20 4:59 ` Mohan Pallaka
@ 2011-05-21 14:30 ` Mohan Pallaka
-1 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-21 14:30 UTC (permalink / raw)
To: Mohan Pallaka
Cc: dmitry.torokhov, linux, rmk+kernel, linux-kernel, linux-arm-msm,
linux-arm-kernel, linux-input, linux-i2c, rmk
On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
> Chip drivers that support both pwm and non-pwm modes
> would encounter compilation errors if the platform doesn't
> have support for pwm, even though the chip is programmed
> to work in non-pwm mode. Add stubs for pwm functions to
> avoid compilation errors in these scenarios.
>
> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
> ---
> include/linux/pwm.h | 23 +++++++++++++++++++++++
> 1 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 7c77575..54877f6 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -3,6 +3,7 @@
>
> struct pwm_device;
>
> +#if defined(CONFIG_HAVE_PWM)
> /*
> * pwm_request - request a PWM device
> */
> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
> */
> void pwm_disable(struct pwm_device *pwm);
>
> +#else
> +
> +struct pwm_device *pwm_request(int pwm_id, const char *label)
> +{
> + return NULL;
> +}
> +
> +void pwm_free(struct pwm_device *pwm) { }
> +
> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> +{
> + return -EINVAL;
> +}
> +
> +int pwm_enable(struct pwm_device *pwm)
> +{
> + return -EINVAL;
> +}
> +
> +void pwm_disable(struct pwm_device *pwm) { }
> +
> +#endif /* CONFIG_HAVE_PWM */
> #endif /* __LINUX_PWM_H */
> --
> Sent by a consultant of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Hi Russell, please review this patch.
--Mohan
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-21 14:30 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-21 14:30 UTC (permalink / raw)
To: linux-arm-kernel
On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
> Chip drivers that support both pwm and non-pwm modes
> would encounter compilation errors if the platform doesn't
> have support for pwm, even though the chip is programmed
> to work in non-pwm mode. Add stubs for pwm functions to
> avoid compilation errors in these scenarios.
>
> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
> ---
> include/linux/pwm.h | 23 +++++++++++++++++++++++
> 1 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 7c77575..54877f6 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -3,6 +3,7 @@
>
> struct pwm_device;
>
> +#if defined(CONFIG_HAVE_PWM)
> /*
> * pwm_request - request a PWM device
> */
> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
> */
> void pwm_disable(struct pwm_device *pwm);
>
> +#else
> +
> +struct pwm_device *pwm_request(int pwm_id, const char *label)
> +{
> + return NULL;
> +}
> +
> +void pwm_free(struct pwm_device *pwm) { }
> +
> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
> +{
> + return -EINVAL;
> +}
> +
> +int pwm_enable(struct pwm_device *pwm)
> +{
> + return -EINVAL;
> +}
> +
> +void pwm_disable(struct pwm_device *pwm) { }
> +
> +#endif /* CONFIG_HAVE_PWM */
> #endif /* __LINUX_PWM_H */
> --
> Sent by a consultant of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Hi Russell, please review this patch.
--Mohan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] pwm: Add stubs for pwm operations
2011-05-21 14:30 ` Mohan Pallaka
@ 2011-05-24 11:04 ` Mohan Pallaka
-1 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-24 11:04 UTC (permalink / raw)
To: Mohan Pallaka
Cc: dmitry.torokhov, linux, rmk+kernel, linux-kernel, linux-arm-msm,
linux-arm-kernel, linux-input, linux-i2c, rmk
Ping.
Hi Russell, please take sometime to review this patch.
Thanks, Mohan.
On 5/21/2011 8:00 PM, Mohan Pallaka wrote:
> On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
>> Chip drivers that support both pwm and non-pwm modes
>> would encounter compilation errors if the platform doesn't
>> have support for pwm, even though the chip is programmed
>> to work in non-pwm mode. Add stubs for pwm functions to
>> avoid compilation errors in these scenarios.
>>
>> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
>> ---
>> include/linux/pwm.h | 23 +++++++++++++++++++++++
>> 1 files changed, 23 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
>> index 7c77575..54877f6 100644
>> --- a/include/linux/pwm.h
>> +++ b/include/linux/pwm.h
>> @@ -3,6 +3,7 @@
>>
>> struct pwm_device;
>>
>> +#if defined(CONFIG_HAVE_PWM)
>> /*
>> * pwm_request - request a PWM device
>> */
>> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
>> */
>> void pwm_disable(struct pwm_device *pwm);
>>
>> +#else
>> +
>> +struct pwm_device *pwm_request(int pwm_id, const char *label)
>> +{
>> + return NULL;
>> +}
>> +
>> +void pwm_free(struct pwm_device *pwm) { }
>> +
>> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
>> +{
>> + return -EINVAL;
>> +}
>> +
>> +int pwm_enable(struct pwm_device *pwm)
>> +{
>> + return -EINVAL;
>> +}
>> +
>> +void pwm_disable(struct pwm_device *pwm) { }
>> +
>> +#endif /* CONFIG_HAVE_PWM */
>> #endif /* __LINUX_PWM_H */
>> --
>> Sent by a consultant of the Qualcomm Innovation Center, Inc.
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>> Forum.
> Hi Russell, please review this patch.
>
> --Mohan
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-24 11:04 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-24 11:04 UTC (permalink / raw)
To: linux-arm-kernel
Ping.
Hi Russell, please take sometime to review this patch.
Thanks, Mohan.
On 5/21/2011 8:00 PM, Mohan Pallaka wrote:
> On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
>> Chip drivers that support both pwm and non-pwm modes
>> would encounter compilation errors if the platform doesn't
>> have support for pwm, even though the chip is programmed
>> to work in non-pwm mode. Add stubs for pwm functions to
>> avoid compilation errors in these scenarios.
>>
>> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
>> ---
>> include/linux/pwm.h | 23 +++++++++++++++++++++++
>> 1 files changed, 23 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
>> index 7c77575..54877f6 100644
>> --- a/include/linux/pwm.h
>> +++ b/include/linux/pwm.h
>> @@ -3,6 +3,7 @@
>>
>> struct pwm_device;
>>
>> +#if defined(CONFIG_HAVE_PWM)
>> /*
>> * pwm_request - request a PWM device
>> */
>> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
>> */
>> void pwm_disable(struct pwm_device *pwm);
>>
>> +#else
>> +
>> +struct pwm_device *pwm_request(int pwm_id, const char *label)
>> +{
>> + return NULL;
>> +}
>> +
>> +void pwm_free(struct pwm_device *pwm) { }
>> +
>> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
>> +{
>> + return -EINVAL;
>> +}
>> +
>> +int pwm_enable(struct pwm_device *pwm)
>> +{
>> + return -EINVAL;
>> +}
>> +
>> +void pwm_disable(struct pwm_device *pwm) { }
>> +
>> +#endif /* CONFIG_HAVE_PWM */
>> #endif /* __LINUX_PWM_H */
>> --
>> Sent by a consultant of the Qualcomm Innovation Center, Inc.
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>> Forum.
> Hi Russell, please review this patch.
>
> --Mohan
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-arm-msm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] pwm: Add stubs for pwm operations
2011-05-24 11:04 ` Mohan Pallaka
(?)
@ 2011-05-26 11:31 ` Mohan Pallaka
-1 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-26 11:31 UTC (permalink / raw)
To: Mohan Pallaka, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
linux-lFZ/pmaqli7XmaaqVzeoHQ, rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi Russell, please let me know if this patch looks okay for you.
Thanks, Mohan.
On 5/24/2011 4:34 PM, Mohan Pallaka wrote:
> Ping.
>
> Hi Russell, please take sometime to review this patch.
>
> Thanks, Mohan.
>
> On 5/21/2011 8:00 PM, Mohan Pallaka wrote:
>> On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
>>> Chip drivers that support both pwm and non-pwm modes
>>> would encounter compilation errors if the platform doesn't
>>> have support for pwm, even though the chip is programmed
>>> to work in non-pwm mode. Add stubs for pwm functions to
>>> avoid compilation errors in these scenarios.
>>>
>>> Signed-off-by: Mohan Pallaka<mpallaka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>>> ---
>>> include/linux/pwm.h | 23 +++++++++++++++++++++++
>>> 1 files changed, 23 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
>>> index 7c77575..54877f6 100644
>>> --- a/include/linux/pwm.h
>>> +++ b/include/linux/pwm.h
>>> @@ -3,6 +3,7 @@
>>>
>>> struct pwm_device;
>>>
>>> +#if defined(CONFIG_HAVE_PWM)
>>> /*
>>> * pwm_request - request a PWM device
>>> */
>>> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
>>> */
>>> void pwm_disable(struct pwm_device *pwm);
>>>
>>> +#else
>>> +
>>> +struct pwm_device *pwm_request(int pwm_id, const char *label)
>>> +{
>>> + return NULL;
>>> +}
>>> +
>>> +void pwm_free(struct pwm_device *pwm) { }
>>> +
>>> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +int pwm_enable(struct pwm_device *pwm)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +void pwm_disable(struct pwm_device *pwm) { }
>>> +
>>> +#endif /* CONFIG_HAVE_PWM */
>>> #endif /* __LINUX_PWM_H */
>>> --
>>> Sent by a consultant of the Qualcomm Innovation Center, Inc.
>>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>>> Forum.
>> Hi Russell, please review this patch.
>>
>> --Mohan
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-arm-msm" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-26 11:31 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-26 11:31 UTC (permalink / raw)
To: Mohan Pallaka, dmitry.torokhov, linux, rmk+kernel
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, linux-input, linux-i2c
Hi Russell, please let me know if this patch looks okay for you.
Thanks, Mohan.
On 5/24/2011 4:34 PM, Mohan Pallaka wrote:
> Ping.
>
> Hi Russell, please take sometime to review this patch.
>
> Thanks, Mohan.
>
> On 5/21/2011 8:00 PM, Mohan Pallaka wrote:
>> On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
>>> Chip drivers that support both pwm and non-pwm modes
>>> would encounter compilation errors if the platform doesn't
>>> have support for pwm, even though the chip is programmed
>>> to work in non-pwm mode. Add stubs for pwm functions to
>>> avoid compilation errors in these scenarios.
>>>
>>> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
>>> ---
>>> include/linux/pwm.h | 23 +++++++++++++++++++++++
>>> 1 files changed, 23 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
>>> index 7c77575..54877f6 100644
>>> --- a/include/linux/pwm.h
>>> +++ b/include/linux/pwm.h
>>> @@ -3,6 +3,7 @@
>>>
>>> struct pwm_device;
>>>
>>> +#if defined(CONFIG_HAVE_PWM)
>>> /*
>>> * pwm_request - request a PWM device
>>> */
>>> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
>>> */
>>> void pwm_disable(struct pwm_device *pwm);
>>>
>>> +#else
>>> +
>>> +struct pwm_device *pwm_request(int pwm_id, const char *label)
>>> +{
>>> + return NULL;
>>> +}
>>> +
>>> +void pwm_free(struct pwm_device *pwm) { }
>>> +
>>> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +int pwm_enable(struct pwm_device *pwm)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +void pwm_disable(struct pwm_device *pwm) { }
>>> +
>>> +#endif /* CONFIG_HAVE_PWM */
>>> #endif /* __LINUX_PWM_H */
>>> --
>>> Sent by a consultant of the Qualcomm Innovation Center, Inc.
>>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>>> Forum.
>> Hi Russell, please review this patch.
>>
>> --Mohan
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-arm-msm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-26 11:31 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-26 11:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell, please let me know if this patch looks okay for you.
Thanks, Mohan.
On 5/24/2011 4:34 PM, Mohan Pallaka wrote:
> Ping.
>
> Hi Russell, please take sometime to review this patch.
>
> Thanks, Mohan.
>
> On 5/21/2011 8:00 PM, Mohan Pallaka wrote:
>> On 5/20/2011 10:29 AM, Mohan Pallaka wrote:
>>> Chip drivers that support both pwm and non-pwm modes
>>> would encounter compilation errors if the platform doesn't
>>> have support for pwm, even though the chip is programmed
>>> to work in non-pwm mode. Add stubs for pwm functions to
>>> avoid compilation errors in these scenarios.
>>>
>>> Signed-off-by: Mohan Pallaka<mpallaka@codeaurora.org>
>>> ---
>>> include/linux/pwm.h | 23 +++++++++++++++++++++++
>>> 1 files changed, 23 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
>>> index 7c77575..54877f6 100644
>>> --- a/include/linux/pwm.h
>>> +++ b/include/linux/pwm.h
>>> @@ -3,6 +3,7 @@
>>>
>>> struct pwm_device;
>>>
>>> +#if defined(CONFIG_HAVE_PWM)
>>> /*
>>> * pwm_request - request a PWM device
>>> */
>>> @@ -28,4 +29,26 @@ int pwm_enable(struct pwm_device *pwm);
>>> */
>>> void pwm_disable(struct pwm_device *pwm);
>>>
>>> +#else
>>> +
>>> +struct pwm_device *pwm_request(int pwm_id, const char *label)
>>> +{
>>> + return NULL;
>>> +}
>>> +
>>> +void pwm_free(struct pwm_device *pwm) { }
>>> +
>>> +int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +int pwm_enable(struct pwm_device *pwm)
>>> +{
>>> + return -EINVAL;
>>> +}
>>> +
>>> +void pwm_disable(struct pwm_device *pwm) { }
>>> +
>>> +#endif /* CONFIG_HAVE_PWM */
>>> #endif /* __LINUX_PWM_H */
>>> --
>>> Sent by a consultant of the Qualcomm Innovation Center, Inc.
>>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>>> Forum.
>> Hi Russell, please review this patch.
>>
>> --Mohan
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-arm-msm" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-18 13:00 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-18 13:00 UTC (permalink / raw)
To: dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
linux-lFZ/pmaqli7XmaaqVzeoHQ, rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
rmk-MIedHU+rSCMANfyc6IWni62ZND6+EDdj, Mohan Pallaka
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Change-Id: Iec4c55fce253bda809947672be82a7bd14bcd663
Signed-off-by: Mohan Pallaka <mpallaka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
include/linux/pwm.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..a3cb33f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_HAVE_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
#endif /* __LINUX_PWM_H */
--
1.7.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-18 13:00 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-18 13:00 UTC (permalink / raw)
To: dmitry.torokhov, linux, rmk+kernel
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, linux-input,
linux-i2c, rmk, Mohan Pallaka
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Change-Id: Iec4c55fce253bda809947672be82a7bd14bcd663
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..a3cb33f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_HAVE_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
#endif /* __LINUX_PWM_H */
--
1.7.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-18 13:00 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-18 13:00 UTC (permalink / raw)
To: linux-arm-kernel
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Change-Id: Iec4c55fce253bda809947672be82a7bd14bcd663
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..a3cb33f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_HAVE_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
#endif /* __LINUX_PWM_H */
--
1.7.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/2] pwm: Add stubs for pwm operations
2011-05-18 5:18 ` Mohan Pallaka
@ 2011-05-18 6:45 ` Dmitry Torokhov
-1 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2011-05-18 6:45 UTC (permalink / raw)
To: Mohan Pallaka
Cc: linux, rmk+kernel, linux-kernel, linux-arm-msm, linux-arm-kernel,
linux-input, linux-i2c, rmk
On Wed, May 18, 2011 at 10:48:45AM +0530, Mohan Pallaka wrote:
> Chip drivers that support both pwm and non-pwm modes
> would encounter compilation errors if the platform doesn't
> have support for pwm, even though the chip is programmed
> to work in non-pwm mode. Add stubs for pwm functions to
> avoid compilation errors in these scenarios.
>
> Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
> ---
> include/linux/pwm.h | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 7c77575..f0bc51f 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -3,6 +3,7 @@
>
> struct pwm_device;
>
> +#if defined(CONFIG_PWM)
Shouldn't it be CONFIG_HAVE_PWM?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-18 6:45 ` Dmitry Torokhov
0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2011-05-18 6:45 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 18, 2011 at 10:48:45AM +0530, Mohan Pallaka wrote:
> Chip drivers that support both pwm and non-pwm modes
> would encounter compilation errors if the platform doesn't
> have support for pwm, even though the chip is programmed
> to work in non-pwm mode. Add stubs for pwm functions to
> avoid compilation errors in these scenarios.
>
> Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
> ---
> include/linux/pwm.h | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index 7c77575..f0bc51f 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -3,6 +3,7 @@
>
> struct pwm_device;
>
> +#if defined(CONFIG_PWM)
Shouldn't it be CONFIG_HAVE_PWM?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
2011-05-18 5:18 [PATCH 0/2] Support for isa1200 haptic chip Mohan Pallaka
@ 2011-05-18 5:18 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-18 5:18 UTC (permalink / raw)
To: dmitry.torokhov, linux, rmk+kernel
Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, linux-input,
linux-i2c, rmk, Mohan Pallaka
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..f0bc51f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
#endif /* __LINUX_PWM_H */
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] pwm: Add stubs for pwm operations
@ 2011-05-18 5:18 ` Mohan Pallaka
0 siblings, 0 replies; 16+ messages in thread
From: Mohan Pallaka @ 2011-05-18 5:18 UTC (permalink / raw)
To: linux-arm-kernel
Chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm, even though the chip is programmed
to work in non-pwm mode. Add stubs for pwm functions to
avoid compilation errors in these scenarios.
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
---
include/linux/pwm.h | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 7c77575..f0bc51f 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -3,6 +3,7 @@
struct pwm_device;
+#if defined(CONFIG_PWM)
/*
* pwm_request - request a PWM device
*/
@@ -28,4 +29,27 @@ int pwm_enable(struct pwm_device *pwm);
*/
void pwm_disable(struct pwm_device *pwm);
+#else
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+ return NULL;
+}
+
+void pwm_free(struct pwm_device *pwm) { }
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+ return -EINVAL;
+}
+
+int pwm_enable(struct pwm_device *pwm)
+{
+ return -EINVAL;
+}
+
+void pwm_disable(struct pwm_device *pwm) { }
+
+
+#endif /* CONFIG_PWM */
#endif /* __LINUX_PWM_H */
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-05-26 11:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 4:59 [PATCH 1/2] pwm: Add stubs for pwm operations Mohan Pallaka
2011-05-20 4:59 ` Mohan Pallaka
2011-05-21 14:30 ` Mohan Pallaka
2011-05-21 14:30 ` Mohan Pallaka
2011-05-24 11:04 ` Mohan Pallaka
2011-05-24 11:04 ` Mohan Pallaka
[not found] ` <4DDB90D9.1020902-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-26 11:31 ` Mohan Pallaka
2011-05-26 11:31 ` Mohan Pallaka
2011-05-26 11:31 ` Mohan Pallaka
-- strict thread matches above, loose matches on Subject: below --
2011-05-18 13:00 Mohan Pallaka
2011-05-18 13:00 ` Mohan Pallaka
2011-05-18 13:00 ` Mohan Pallaka
2011-05-18 5:18 [PATCH 0/2] Support for isa1200 haptic chip Mohan Pallaka
2011-05-18 5:18 ` [PATCH 1/2] pwm: Add stubs for pwm operations Mohan Pallaka
2011-05-18 5:18 ` Mohan Pallaka
2011-05-18 6:45 ` Dmitry Torokhov
2011-05-18 6:45 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.