Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405140
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv3] support for AD5820 camera auto-focus coil |
| Date | 2016-05-23 09:50 +0200 |
| Message-ID | <rBSMF-31p-3@gated-at.bofh.it> (permalink) |
| References | <rzRL3-7Yd-5@gated-at.bofh.it> <rB7Xr-80M-3@gated-at.bofh.it> <rB8A9-8sI-11@gated-at.bofh.it> <rBcNr-2tP-1@gated-at.bofh.it> <rBdzP-30l-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Saturday 21 May 2016 14:43:43 Ivaylo Dimitrov wrote:
> >diff --git a/include/media/ad5820.h b/include/media/ad5820.h
> >new file mode 100644
> >index 0000000..f5a1565
> >--- /dev/null
> >+++ b/include/media/ad5820.h
> >@@ -0,0 +1,70 @@
> >+/*
> >+ * include/media/ad5820.h
> >+ *
> >+ * Copyright (C) 2008 Nokia Corporation
> >+ * Copyright (C) 2007 Texas Instruments
> >+ *
> >+ * Contact: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
> >+ * Sakari Ailus <sakari.ailus@nokia.com>
> >+ *
> >+ * Based on af_d88.c by Texas Instruments.
> >+ *
> >+ * This program is free software; you can redistribute it and/or
> >+ * modify it under the terms of the GNU General Public License
> >+ * version 2 as published by the Free Software Foundation.
> >+ *
> >+ * This program is distributed in the hope that it will be useful, but
> >+ * WITHOUT ANY WARRANTY; without even the implied warranty of
> >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> >+ * General Public License for more details.
> >+ *
> >+ * You should have received a copy of the GNU General Public License
> >+ * along with this program; if not, write to the Free Software
> >+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> >+ * 02110-1301 USA
> >+ */
> >+
> >+#ifndef AD5820_H
> >+#define AD5820_H
> >+
> >+#include <linux/i2c.h>
> >+#include <linux/mutex.h>
> >+#include <linux/videodev2.h>
> >+
> >+#include <media/v4l2-ctrls.h>
> >+#include <media/v4l2-subdev.h>
> >+
> >+struct regulator;
> >+
> >+#define AD5820_NAME "ad5820"
> >+#define AD5820_I2C_ADDR (0x18 >> 1)
Maybe write I2C address is more readable form? What is reason such
bit shift format?
> >+/* Register definitions */
> >+#define AD5820_POWER_DOWN (1 << 15)
> >+#define AD5820_DAC_SHIFT 4
>
> Do those defines really belong here? Isn't it better if they are moved to
> ad5820.c?
For me it looks like this is private for ad5820.c.
> >+#define AD5820_RAMP_MODE_LINEAR (0 << 3)
> >+#define AD5820_RAMP_MODE_64_16 (1 << 3)
> >+
> >+struct ad5820_platform_data {
> >+ int (*set_xshutdown)(struct v4l2_subdev *subdev, int set);
> >+};
This is for legacy board code support right? We need DT support for N900
as legacy board code is going to be deleted.
> >+#define to_ad5820_device(sd) container_of(sd, struct ad5820_device, subdev)
> >+
> >+struct ad5820_device {
> >+ struct v4l2_subdev subdev;
> >+ struct ad5820_platform_data *platform_data;
> >+ struct regulator *vana;
> >+
> >+ struct v4l2_ctrl_handler ctrls;
> >+ u32 focus_absolute;
> >+ u32 focus_ramp_time;
> >+ u32 focus_ramp_mode;
> >+
> >+ struct mutex power_lock;
> >+ int power_count;
> >+
> >+ int standby : 1;
> >+};
> >+
>
> The same for struct ad5820_device, is it really part of the public API?
Yes, this is also private for ad5820.c
> >+#endif /* AD5820_H */
> >
> >
> >
--
Pali Rohár
pali.rohar@gmail.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-17 20:20 +0200
Re: [PATCH] support for AD5820 camera auto-focus coil Marcus Folkesson <marcus.folkesson@gmail.com> - 2016-05-17 20:40 +0200
Re: [PATCH] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-18 10:40 +0200
[PATCHv2] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-21 07:50 +0200
Re: [PATCHv2] support for AD5820 camera auto-focus coil Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-21 08:30 +0200
[PATCHv3] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-21 13:00 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-21 13:50 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Pali Rohár <pali.rohar@gmail.com> - 2016-05-23 09:50 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-24 11:10 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-24 11:20 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-24 22:30 +0200
Re: [PATCHv3] support for AD5820 camera auto-focus coil Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-26 05:50 +0200
[PATCHv4] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-24 11:20 +0200
Re: [PATCHv4] support for AD5820 camera auto-focus coil Sakari Ailus <sakari.ailus@iki.fi> - 2016-05-25 23:30 +0200
Re: [PATCHv4] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-27 22:40 +0200
[PATCHv5] support for AD5820 camera auto-focus coil Pavel Machek <pavel@ucw.cz> - 2016-05-27 23:00 +0200
csiph-web