From: Tony Lindgren <tony@atomide.com>
To: Sakari Ailus <sakari.ailus@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] TCM825x: Include invertation of image mirroring in configuration
Date: Fri, 16 May 2008 10:42:07 -0700 [thread overview]
Message-ID: <20080516174207.GM23002@atomide.com> (raw)
In-Reply-To: <12107667331990-git-send-email-sakari.ailus@nokia.com>
* Sakari Ailus <sakari.ailus@nokia.com> [080514 06:37]:
> Add invertation of image mirroring register bits to default
> configuration.
>
> This is useful when the camera module is e.g. mounted upside down.
Pushing today.
Tony
> Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
> ---
> drivers/media/video/tcm825x.c | 6 ++++++
> drivers/media/video/tcm825x.h | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/video/tcm825x.c b/drivers/media/video/tcm825x.c
> index e57a646..216638e 100644
> --- a/drivers/media/video/tcm825x.c
> +++ b/drivers/media/video/tcm825x.c
> @@ -523,6 +523,9 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
> if (val < 0)
> return val;
>
> + if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
> + val ^= sensor->platform_data->is_upside_down();
> +
> vc->value = val;
> return 0;
> }
> @@ -556,6 +559,9 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
> if (lvc == NULL)
> return -EINVAL;
>
> + if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
> + val ^= sensor->platform_data->is_upside_down();
> +
> val = val << lvc->start_bit;
> if (tcm825x_write_reg_mask(client, lvc->reg, val))
> return -EIO;
> diff --git a/drivers/media/video/tcm825x.h b/drivers/media/video/tcm825x.h
> index 966765b..770ebac 100644
> --- a/drivers/media/video/tcm825x.h
> +++ b/drivers/media/video/tcm825x.h
> @@ -182,6 +182,7 @@ struct tcm825x_platform_data {
> int (*needs_reset)(struct v4l2_int_device *s, void *buf,
> struct v4l2_pix_format *fmt);
> int (*ifparm)(struct v4l2_ifparm *p);
> + int (*is_upside_down)(void);
> };
>
> /* Array of image sizes supported by TCM825X. These must be ordered from
> --
> 1.5.0.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-05-16 17:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 16:04 [PATCH 1/3] TCM825x: Include invertation of image mirroring in configuration Sakari Ailus
2008-05-13 16:04 ` [PATCH 2/3] N810: Don't export camera orientation Sakari Ailus
2008-05-13 16:04 ` [PATCH 3/3] N800: Select tcm825x only if wanted Sakari Ailus
2008-05-13 20:01 ` [PATCH 2/3] N810: Don't export camera orientation Felipe Balbi
2008-05-14 12:04 ` Sakari Ailus
2008-05-14 12:05 ` [PATCH 1/3] TCM825x: Include invertation of image mirroring in configuration Sakari Ailus
2008-05-14 12:05 ` [PATCH 2/3] N810: Don't export camera orientation Sakari Ailus
2008-05-14 12:05 ` [PATCH 3/3] N800: Select tcm825x only if wanted Sakari Ailus
2008-05-16 17:44 ` Tony Lindgren
2008-05-16 17:44 ` [PATCH 2/3] N810: Don't export camera orientation Tony Lindgren
2008-05-16 17:42 ` Tony Lindgren [this message]
2008-05-14 22:58 ` Felipe Balbi
2008-05-15 6:54 ` andrzej zaborowski
2008-05-15 7:57 ` Felipe Balbi
2008-05-15 8:11 ` andrzej zaborowski
2008-05-15 8:17 ` Felipe Balbi
2008-05-13 19:53 ` [PATCH 1/3] TCM825x: Include invertation of image mirroring in configuration Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080516174207.GM23002@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
--cc=sakari.ailus@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox