All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] AI TB: Always Innovating OMAP3-based Touch Book
@ 2009-11-19 17:18 Gregoire Gentil
  2009-11-19 17:18 ` [PATCH 1/8] defconfig file of " Gregoire Gentil
  0 siblings, 1 reply; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin


This series adds support for Always Innovating OMAP3-based Touch Book.

I also attach the patches as it seems that the last time, the indentation
was screwed up by the mailer.

Gregoire Gentil (8):
  defconfig file of Always Innovating OMAP3-based Touch Book
  Board file of Always Innovating OMAP3-based Touch Book
  Freescale MMA7455 accelerometer driver
  Driver for Always Innovating OMAP3-based Touch Book keyboard
  HID file for Always Innovating OMAP3-based Touch Book keyboard
  Audio driver of Always Innovating OMAP3-based Touch Book
  Video driver of Always Innovating OMAP3-based Touch Book
  Additional files for Always Innovating OMAP3-based Touch Book

 arch/arm/configs/omap3_touchbook_defconfig | 2441 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/Kconfig                |    5 +
 arch/arm/mach-omap2/Makefile               |    2 +
 arch/arm/mach-omap2/board-omap3touchbook.c |  683 ++++++++
 drivers/hid/Kconfig                        |    7 +
 drivers/hid/Makefile                       |    1 +
 drivers/hid/hid-alwaysinnovating.c         |  262 +++
 drivers/hid/hid-core.c                     |    1 +
 drivers/hid/hid-ids.h                      |    3 +
 drivers/input/misc/Kconfig                 |    9 +
 drivers/input/misc/Makefile                |    2 +-
 drivers/input/misc/mma7455l.c              |  626 +++++++
 drivers/video/omap/lcd_omap3touchbook.c    |  130 ++
 include/linux/mma7455l.h                   |   11 +
 sound/soc/omap/Kconfig                     |    8 +
 sound/soc/omap/Makefile                    |    2 +
 sound/soc/omap/omap3touchbook.c            |  211 +++
 17 files changed, 4403 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/configs/omap3_touchbook_defconfig
 create mode 100644 arch/arm/mach-omap2/board-omap3touchbook.c
 create mode 100644 drivers/hid/hid-alwaysinnovating.c
 create mode 100644 drivers/input/misc/mma7455l.c
 create mode 100644 drivers/video/omap/lcd_omap3touchbook.c
 create mode 100644 include/linux/mma7455l.h
 create mode 100644 sound/soc/omap/omap3touchbook.c


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/8] defconfig file of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18 [PATCH 0/8] AI TB: Always Innovating OMAP3-based Touch Book Gregoire Gentil
@ 2009-11-19 17:18 ` Gregoire Gentil
  2009-11-19 17:18   ` [PATCH 2/8] Board " Gregoire Gentil
  0 siblings, 1 reply; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 arch/arm/configs/omap3_touchbook_defconfig | 2441 ++++++++++++++++++++++++++++
 1 files changed, 2441 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap3_touchbook_defconfig

diff --git a/arch/arm/configs/omap3_touchbook_defconfig b/arch/arm/configs/omap3_touchbook_defconfig
new file mode 100644
index 0000000..aa67460
--- /dev/null
+++ b/arch/arm/configs/omap3_touchbook_defconfig
@@ -0,0 +1,2441 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc7
+# Sat Nov 14 17:16:08 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_OPROFILE_ARMV7=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+CONFIG_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+CONFIG_SLOW_WORK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_BCMRING is not set
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+# CONFIG_ARCH_OMAP1 is not set
+# CONFIG_ARCH_OMAP2 is not set
+CONFIG_ARCH_OMAP3=y
+# CONFIG_ARCH_OMAP4 is not set
+
+#
+# OMAP Feature Selections
+#
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+CONFIG_OMAP_RESET_CLOCKS=y
+# CONFIG_OMAP_MUX is not set
+CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MBOX_FWK is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_DM_TIMER=y
+# CONFIG_OMAP_LL_DEBUG_UART1 is not set
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_NONE is not set
+# CONFIG_OMAP_PM_NONE is not set
+CONFIG_OMAP_PM_NOOP=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3EVM is not set
+# CONFIG_MACH_OMAP3517EVM is not set
+# CONFIG_MACH_OMAP3_PANDORA is not set
+CONFIG_MACH_OMAP3_TOUCHBOOK=y
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_OMAP_ZOOM2 is not set
+# CONFIG_MACH_CM_T35 is not set
+# CONFIG_MACH_OMAP_ZOOM3 is not set
+# CONFIG_MACH_OMAP_3630SDP is not set
+# CONFIG_MACH_IGEP0020 is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_V7=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_THUMBEE=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+# CONFIG_ARM_ERRATA_430973 is not set
+# CONFIG_ARM_ERRATA_458693 is not set
+# CONFIG_ARM_ERRATA_460075 is not set
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_HZ=128
+# CONFIG_THUMB2_KERNEL is not set
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_LEDS=y
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE is not set
+CONFIG_CAN_PM_TRACE=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=y
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+# CONFIG_IPV6_PIMSM_V2 is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_DCCP=m
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CT_PROTO_UDPLITE=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+# CONFIG_NETFILTER_TPROXY is not set
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_HL=m
+# CONFIG_NETFILTER_XT_TARGET_LED is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
+# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_HL=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
+CONFIG_NETFILTER_XT_MATCH_U32=m
+# CONFIG_NETFILTER_XT_MATCH_OSF is not set
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+CONFIG_IP_VS_DEBUG=y
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_AH_ESP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_DCCP=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_PROTO_UDPLITE=m
+CONFIG_NF_NAT_PROTO_SCTP=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_RAW=m
+# CONFIG_BRIDGE_NF_EBTABLES is not set
+CONFIG_IP_DCCP=m
+CONFIG_INET_DCCP_DIAG=m
+
+#
+# DCCP CCIDs Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP_CCID2_DEBUG is not set
+CONFIG_IP_DCCP_CCID3=y
+# CONFIG_IP_DCCP_CCID3_DEBUG is not set
+CONFIG_IP_DCCP_CCID3_RTO=100
+CONFIG_IP_DCCP_TFRC_LIB=y
+
+#
+# DCCP Kernel Hacking
+#
+# CONFIG_IP_DCCP_DEBUG is not set
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+# CONFIG_RDS is not set
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+# CONFIG_ATM_CLIP_NO_ICMP is not set
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+CONFIG_WAN_ROUTER=m
+# CONFIG_PHONET is not set
+# CONFIG_IEEE802154 is not set
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_MULTIQ=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_DRR=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
+# CONFIG_NET_EMATCH is not set
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_SCH_FIFO=y
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NET_DROP_MONITOR is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIBTUSB=y
+CONFIG_BT_HCIBTSDIO=y
+CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=y
+CONFIG_BT_HCIBPA10X=y
+CONFIG_BT_HCIBFUSB=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_BT_MRVL is not set
+CONFIG_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+# CONFIG_RXKAD is not set
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=m
+# CONFIG_NL80211_TESTMODE is not set
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_CFG80211_DEFAULT_PS=y
+CONFIG_CFG80211_DEFAULT_PS_VALUE=1
+# CONFIG_CFG80211_DEBUGFS is not set
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=m
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_WIMAX=m
+CONFIG_WIMAX_DEBUG_LEVEL=8
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_TESTS is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SST25L is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_OMAP_PREFETCH=y
+# CONFIG_MTD_NAND_OMAP_PREFETCH_DMA is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MG_DISK is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+CONFIG_EEPROM_93CX6=y
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SCH=m
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+CONFIG_ISCSI_TCP=m
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID6_PQ=m
+# CONFIG_ASYNC_RAID6_TEST is not set
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+# CONFIG_DM_LOG_USERSPACE is not set
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+# CONFIG_DM_MULTIPATH_QL is not set
+# CONFIG_DM_MULTIPATH_ST is not set
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_MACVLAN=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_VETH=m
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+CONFIG_WLAN=y
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_LIBERTAS is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
+# CONFIG_AT76C50X_USB is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_ATH_COMMON is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_ZD1211RW is not set
+# CONFIG_RT2X00 is not set
+# CONFIG_WL12XX is not set
+# CONFIG_IWM is not set
+
+#
+# WiMAX Wireless Broadband devices
+#
+# CONFIG_WIMAX_I2400M_USB is not set
+# CONFIG_WIMAX_I2400M_SDIO is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_ATM_DRIVERS is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_PPPOATM is not set
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETCONSOLE_DYNAMIC=y
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_TWL4030 is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_SENTELIC is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_MOUSE_SYNAPTICS_I2C is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=y
+# CONFIG_TOUCHSCREEN_AD7877 is not set
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
+# CONFIG_TOUCHSCREEN_EETI is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MCS5000 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_TOUCHSCREEN_W90X900 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
+CONFIG_INPUT_TWL4030_PWRBUTTON=y
+CONFIG_INPUT_UINPUT=y
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
+CONFIG_INPUT_MMA7455L=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_OMAP24XX=y
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+CONFIG_BATTERY_BQ27x00=y
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_G760A is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_SHT15 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_SENSORS_LIS3_SPI is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+# CONFIG_TWL4030_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_CORE=y
+# CONFIG_TWL4030_POWER is not set
+# CONFIG_TWL4030_CODEC is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+CONFIG_REGULATOR_TWL4030=y
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_TPS65023 is not set
+# CONFIG_REGULATOR_TPS6507X is not set
+# CONFIG_MEDIA_SUPPORT is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_FB_OMAP is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
+CONFIG_SND_JACK=y
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_HRTIMER=m
+CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_RAWMIDI_SEQ=m
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_ARM is not set
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3_TOUCHBOOK=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TWL4030=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+# CONFIG_HID_A4TECH is not set
+CONFIG_HID_ALWAYSINNOVATING=y
+# CONFIG_HID_APPLE is not set
+# CONFIG_HID_BELKIN is not set
+# CONFIG_HID_CHERRY is not set
+# CONFIG_HID_CHICONY is not set
+# CONFIG_HID_CYPRESS is not set
+# CONFIG_HID_DRAGONRISE is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_KYE is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_TWINHAN is not set
+# CONFIG_HID_KENSINGTON is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_NTRIG is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_HID_GREENASIA is not set
+# CONFIG_HID_SMARTJOYPLUS is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_HID_THRUSTMASTER is not set
+# CONFIG_HID_WACOM is not set
+# CONFIG_HID_ZEROPLUS is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_OXU210HP_HCD=y
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_ISP1362_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 343x high speed USB support
+#
+# CONFIG_USB_MUSB_HOST is not set
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_HDRC_HCD=y
+# CONFIG_MUSB_PIO_ONLY is not set
+CONFIG_USB_INVENTRA_DMA=y
+# CONFIG_USB_TI_CPPI_DMA is not set
+# CONFIG_USB_MUSB_DEBUG is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
+CONFIG_USB_TMC=m
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_CH341=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP210X is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_IUU=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_MOTOROLA=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
+# CONFIG_USB_SERIAL_QUALCOMM is not set
+CONFIG_USB_SERIAL_SPCP8X5=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIEMENS_MPI=m
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+# CONFIG_USB_SERIAL_SYMBOL is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_OPTICON=m
+CONFIG_USB_SERIAL_DEBUG=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+CONFIG_USB_SISUSBVGA=m
+CONFIG_USB_SISUSBVGA_CON=y
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+CONFIG_USB_TEST=m
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_ATM is not set
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_DEBUG_FS=y
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_R8A66597 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C_HSOTG is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LANGWELL is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_HNPTEST=y
+# CONFIG_USB_AUDIO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_ETH_EEM is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_MIDI_GADGET=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=y
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+# CONFIG_NOP_USB_XCEIV is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_SPI=m
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+# CONFIG_LEDS_TRIGGER_GPIO is not set
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+CONFIG_RTC_DRV_TWL4030=y
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+# CONFIG_RTC_DRV_RX8025 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+# CONFIG_RTC_DRV_PCF2123 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_UIO=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+
+#
+# TI VLYNQ
+#
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_USB_IP_COMMON is not set
+# CONFIG_W35UND is not set
+# CONFIG_PRISM2_USB is not set
+# CONFIG_ECHO is not set
+# CONFIG_OTUS is not set
+# CONFIG_COMEDI is not set
+# CONFIG_ASUS_OLED is not set
+# CONFIG_INPUT_MIMIO is not set
+# CONFIG_TRANZPORT is not set
+
+#
+# Android
+#
+
+#
+# Qualcomm MSM Camera And Video
+#
+
+#
+# Camera Sensor Selection
+#
+# CONFIG_INPUT_GPIO is not set
+# CONFIG_DST is not set
+# CONFIG_POHMELFS is not set
+# CONFIG_PLAN9AUTH is not set
+# CONFIG_LINE6_USB is not set
+# CONFIG_USB_SERIAL_QUATECH2 is not set
+# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
+# CONFIG_VT6656 is not set
+# CONFIG_FB_UDL is not set
+
+#
+# RAR Register Driver
+#
+# CONFIG_RAR_REGISTER is not set
+# CONFIG_IIO is not set
+
+#
+# CBUS support
+#
+# CONFIG_CBUS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4_FS_XATTR=y
+# CONFIG_EXT4_FS_POSIX_ACL is not set
+# CONFIG_EXT4_FS_SECURITY is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+CONFIG_REISERFS_PROC_INFO=y
+CONFIG_REISERFS_FS_XATTR=y
+# CONFIG_REISERFS_FS_POSIX_ACL is not set
+# CONFIG_REISERFS_FS_SECURITY is not set
+CONFIG_JFS_FS=m
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QUOTA_TREE=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=y
+# CONFIG_CUSE is not set
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_ECRYPT_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_FS_XATTR=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+# CONFIG_JFFS2_CMODE_PRIORITY is not set
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_JFFS2_CMODE_FAVOURLZO=y
+CONFIG_UBIFS_FS=y
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_CRAMFS is not set
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_V4_1 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+CONFIG_CIFS_STATS2=y
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_DFS_UPCALL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_KMEMLEAK is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_DEBUG_CREDENTIALS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_PAGE_POISONING is not set
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_EVENT_TRACING=y
+CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_RING_BUFFER_ALLOW_SWAP=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
+CONFIG_FTRACE=y
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
+# CONFIG_BOOT_TRACER is not set
+CONFIG_BRANCH_PROFILE_NONE=y
+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
+# CONFIG_PROFILE_ALL_BRANCHES is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_RING_BUFFER_BENCHMARK is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_ASYNC_PQ=m
+CONFIG_ASYNC_RAID6_RECOV=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_GHASH=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+CONFIG_BINARY_PRINTF=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18 ` [PATCH 1/8] defconfig file of " Gregoire Gentil
@ 2009-11-19 17:18   ` Gregoire Gentil
  2009-11-19 17:18     ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Gregoire Gentil
  2009-11-20  4:20     ` [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book Hiremath, Vaibhav
  0 siblings, 2 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 arch/arm/mach-omap2/board-omap3touchbook.c |  683 ++++++++++++++++++++++++++++
 1 files changed, 683 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-omap3touchbook.c

diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
new file mode 100644
index 0000000..ad3ef6e
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -0,0 +1,683 @@
+/*
+ * linux/arch/arm/mach-omap2/board-omap3touchbook.c
+ *
+ * Copyright (C) 2009 Always Innovating
+ *
+ * Modified from mach-omap2/board-omap3beagleboard.c
+ *
+ * Initial code: Grégoire Gentil, Tim Yamin
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+
+#include <plat/mcspi.h>
+#include <linux/spi/spi.h>
+
+#include <linux/spi/ads7846.h>
+#include <linux/mma7455l.h>
+
+#include <plat/dmtimer.h>
+#include <linux/backlight.h>
+
+#include <linux/regulator/machine.h>
+#include <linux/i2c/twl4030.h>
+
+#include <mach/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/flash.h>
+
+#include <plat/board.h>
+#include <plat/common.h>
+#include <plat/gpmc.h>
+#include <plat/nand.h>
+#include <plat/mux.h>
+#include <plat/usb.h>
+#include <plat/timer-gp.h>
+
+#include "mmc-twl4030.h"
+
+#include <asm/setup.h>
+
+#define GPMC_CS0_BASE  0x60
+#define GPMC_CS_SIZE   0x30
+
+#define NAND_BLOCK_SIZE		SZ_128K
+
+#define OMAP3_AC_GPIO		136
+#define OMAP3_TS_GPIO		162
+#define TB_BL_PWM_TIMER		9
+#define TB_KILL_POWER_GPIO	168
+
+unsigned long touchbook_revision;
+
+static struct mtd_partition omap3touchbook_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name		= "X-Loader",
+		.offset		= 0,
+		.size		= 4 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size		= 15 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot Env",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size		= 1 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "Kernel",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size		= 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "File System",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+static struct omap_nand_platform_data omap3touchbook_nand_data = {
+	.options	= NAND_BUSWIDTH_16,
+	.parts		= omap3touchbook_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(omap3touchbook_nand_partitions),
+	.dma_channel	= -1,		/* disable DMA in OMAP NAND driver */
+	.nand_setup	= NULL,
+	.dev_ready	= NULL,
+};
+
+static struct resource omap3touchbook_nand_resource = {
+	.flags		= IORESOURCE_MEM,
+};
+
+static struct platform_device omap3touchbook_nand_device = {
+	.name		= "omap2-nand",
+	.id		= -1,
+	.dev		= {
+		.platform_data	= &omap3touchbook_nand_data,
+	},
+	.num_resources	= 1,
+	.resource	= &omap3touchbook_nand_resource,
+};
+
+#include "sdram-micron-mt46h32m32lf-6.h"
+
+static struct twl4030_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.wires		= 8,
+		.gpio_wp	= 29,
+	},
+	{}	/* Terminator */
+};
+
+static struct platform_device omap3_touchbook_lcd_device = {
+	.name		= "omap3touchbook_lcd",
+	.id		= -1,
+};
+
+static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
+	.ctrl_name	= "internal",
+};
+
+static struct regulator_consumer_supply touchbook_vmmc1_supply = {
+	.supply			= "vmmc",
+};
+
+static struct regulator_consumer_supply touchbook_vsim_supply = {
+	.supply			= "vmmc_aux",
+};
+
+static struct gpio_led gpio_leds[];
+
+static int touchbook_twl_gpio_setup(struct device *dev,
+		unsigned gpio, unsigned ngpio)
+{
+	if (system_rev >= 0x20 && system_rev <= 0x34301000) {
+		omap_cfg_reg(AG9_34XX_GPIO23);
+		mmc[0].gpio_wp = 23;
+	} else {
+		omap_cfg_reg(AH8_34XX_GPIO29);
+	}
+	/* gpio + 0 is "mmc0_cd" (input/IRQ) */
+	mmc[0].gpio_cd = gpio + 0;
+	twl4030_mmc_init(mmc);
+
+	/* link regulators to MMC adapters */
+	touchbook_vmmc1_supply.dev = mmc[0].dev;
+	touchbook_vsim_supply.dev = mmc[0].dev;
+
+	/* REVISIT: need ehci-omap hooks for external VBUS
+	 * power switch and overcurrent detect
+	 */
+
+	gpio_request(gpio + 1, "EHCI_nOC");
+	gpio_direction_input(gpio + 1);
+
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
+	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
+	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+
+	return 0;
+}
+
+static struct twl4030_gpio_platform_data touchbook_gpio_data = {
+	.gpio_base	= OMAP_MAX_GPIO_LINES,
+	.irq_base	= TWL4030_GPIO_IRQ_BASE,
+	.irq_end	= TWL4030_GPIO_IRQ_END,
+	.use_leds	= true,
+	.pullups	= BIT(1),
+	.pulldowns	= BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
+				| BIT(15) | BIT(16) | BIT(17),
+	.setup		= touchbook_twl_gpio_setup,
+};
+
+static struct regulator_consumer_supply touchbook_vdac_supply = {
+	.supply		= "vdac",
+	.dev		= &omap3_touchbook_lcd_device.dev,
+};
+
+static struct regulator_consumer_supply touchbook_vdvi_supply = {
+	.supply		= "vdvi",
+	.dev		= &omap3_touchbook_lcd_device.dev,
+};
+
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+static struct regulator_init_data touchbook_vmmc1 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 3150000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &touchbook_vmmc1_supply,
+};
+
+/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
+static struct regulator_init_data touchbook_vsim = {
+	.constraints = {
+		.min_uV			= 1800000,
+		.max_uV			= 3000000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &touchbook_vsim_supply,
+};
+
+/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
+static struct regulator_init_data touchbook_vdac = {
+	.constraints = {
+		.min_uV			= 1800000,
+		.max_uV			= 1800000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &touchbook_vdac_supply,
+};
+
+/* VPLL2 for digital video outputs */
+static struct regulator_init_data touchbook_vpll2 = {
+	.constraints = {
+		.name			= "VDVI",
+		.min_uV			= 1800000,
+		.max_uV			= 1800000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &touchbook_vdvi_supply,
+};
+
+static struct twl4030_usb_data touchbook_usb_data = {
+	.usb_mode	= T2_USB_MODE_ULPI,
+};
+
+static struct twl4030_codec_audio_data touchbook_audio_data = {
+	.audio_mclk = 26000000,
+};
+
+static struct twl4030_codec_data touchbook_codec_data = {
+	.audio_mclk = 26000000,
+	.audio = &touchbook_audio_data,
+};
+
+static struct twl4030_platform_data touchbook_twldata = {
+	.irq_base	= TWL4030_IRQ_BASE,
+	.irq_end	= TWL4030_IRQ_END,
+
+	/* platform_data for children goes here */
+	.usb		= &touchbook_usb_data,
+	.gpio		= &touchbook_gpio_data,
+	.codec		= &touchbook_codec_data,
+	.vmmc1		= &touchbook_vmmc1,
+	.vsim		= &touchbook_vsim,
+	.vdac		= &touchbook_vdac,
+	.vpll2		= &touchbook_vpll2,
+};
+
+static struct i2c_board_info __initdata touchbook_i2c_boardinfo[] = {
+	{
+		I2C_BOARD_INFO("twl4030", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.irq = INT_34XX_SYS_NIRQ,
+		.platform_data = &touchbook_twldata,
+	},
+};
+
+static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
+	{
+		I2C_BOARD_INFO("bq27200", 0x55),
+	},
+};
+
+static int __init omap3_touchbook_i2c_init(void)
+{
+	/* Standard TouchBook bus */
+	omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo,
+			ARRAY_SIZE(touchbook_i2c_boardinfo));
+
+	/* Additional TouchBook bus */
+	omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
+			ARRAY_SIZE(touchBook_i2c_boardinfo));
+
+	return 0;
+}
+
+static void __init omap3_ads7846_init(void)
+{
+	if (gpio_request(OMAP3_TS_GPIO, "ads7846_pen_down")) {
+		printk(KERN_ERR "Failed to request GPIO %d for "
+				"ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
+		return;
+	}
+
+	gpio_direction_input(OMAP3_TS_GPIO);
+	omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
+	omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa);
+}
+
+static struct ads7846_platform_data ads7846_config = {
+	.x_min			= 100,
+	.y_min			= 265,
+	.x_max			= 3950,
+	.y_max			= 3750,
+	.x_plate_ohms		= 40,
+	.pressure_max		= 255,
+	.debounce_max		= 10,
+	.debounce_tol		= 5,
+	.debounce_rep		= 1,
+	.gpio_pendown		= OMAP3_TS_GPIO,
+	.keep_vref_on		= 1,
+};
+
+static struct omap2_mcspi_device_config ads7846_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,	/* 0: slave, 1: master */
+};
+
+static struct spi_board_info omap3_ads7846_spi_board_info[] __initdata = {
+	{
+		.modalias		= "ads7846",
+		.bus_num		= 4,
+		.chip_select		= 0,
+		.max_speed_hz		= 1500000,
+		.controller_data	= &ads7846_mcspi_config,
+		.irq			= OMAP_GPIO_IRQ(OMAP3_TS_GPIO),
+		.platform_data		= &ads7846_config,
+	}
+};
+
+static struct gpio_led gpio_leds[] = {
+	{
+		.name			= "touchbook::usr0",
+		.default_trigger	= "heartbeat",
+		.gpio			= 150,
+	},
+	{
+		.name			= "touchbook::usr1",
+		.default_trigger	= "mmc0",
+		.gpio			= 149,
+	},
+	{
+		.name			= "touchbook::pmu_stat",
+		.gpio			= -EINVAL,	/* gets replaced */
+		.active_low		= true,
+	},
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+	.leds		= gpio_leds,
+	.num_leds	= ARRAY_SIZE(gpio_leds),
+};
+
+static struct platform_device leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &gpio_led_info,
+	},
+};
+
+static struct gpio_keys_button gpio_buttons[] = {
+	{
+		.code			= BTN_EXTRA,
+		.gpio			= 7,
+		.desc			= "user",
+		.wakeup			= 1,
+	},
+	{
+		.code			= KEY_POWER,
+		.gpio			= 183,
+		.desc			= "power",
+		.wakeup			= 1,
+	},
+};
+
+static struct gpio_keys_platform_data gpio_key_info = {
+	.buttons	= gpio_buttons,
+	.nbuttons	= ARRAY_SIZE(gpio_buttons),
+};
+
+static struct platform_device keys_gpio = {
+	.name	= "gpio-keys",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &gpio_key_info,
+	},
+};
+
+static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
+	{ OMAP_TAG_LCD,		&omap3_touchbook_lcd_config },
+};
+
+static void __init omap3_touchbook_init_irq(void)
+{
+	omap_board_config = omap3_touchbook_config;
+	omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
+	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+			     mt46h32m32lf6_sdrc_params);
+	omap_init_irq();
+#ifdef CONFIG_OMAP_32K_TIMER
+	omap2_gp_clockevent_set_gptimer(12);
+#endif
+	omap_gpio_init();
+}
+
+static struct platform_device *omap3_touchbook_devices[] __initdata = {
+	&omap3_touchbook_lcd_device,
+	&leds_gpio,
+	&keys_gpio,
+};
+
+static void __init omap3touchbook_flash_init(void)
+{
+	u8 cs = 0;
+	u8 nandcs = GPMC_CS_NUM + 1;
+
+	u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
+
+	/* find out the chip-select on which NAND exists */
+	while (cs < GPMC_CS_NUM) {
+		u32 ret = 0;
+		ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
+
+		if ((ret & 0xC00) == 0x800) {
+			printk(KERN_INFO "Found NAND on CS%d\n", cs);
+			if (nandcs > GPMC_CS_NUM)
+				nandcs = cs;
+		}
+		cs++;
+	}
+
+	if (nandcs > GPMC_CS_NUM) {
+		printk(KERN_INFO "NAND: Unable to find configuration "
+				 "in GPMC\n ");
+		return;
+	}
+
+	if (nandcs < GPMC_CS_NUM) {
+		omap3touchbook_nand_data.cs = nandcs;
+		omap3touchbook_nand_data.gpmc_cs_baseaddr = (void *)
+			(gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
+		omap3touchbook_nand_data.gpmc_baseaddr =
+						(void *) (gpmc_base_add);
+
+		printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
+		if (platform_device_register(&omap3touchbook_nand_device) < 0)
+			printk(KERN_ERR "Unable to register NAND device\n");
+	}
+}
+
+static void __init omap3_mma7455l_init(void)
+{
+	int ret;
+
+	ret = gpio_request(OMAP3_AC_GPIO, "mma7455l");
+	if (ret < 0) {
+		printk(KERN_ERR "Failed to request GPIO %d for mma7455l IRQ\n",
+			OMAP3_AC_GPIO);
+		return;
+	}
+
+	gpio_direction_input(OMAP3_AC_GPIO);
+}
+
+static struct mma7455l_platform_data mma7455l_config = {
+	.calibration_x = -4,
+	.calibration_y = 28,
+	.calibration_z = -28,
+};
+
+static struct omap2_mcspi_device_config mma7455l_mcspi_config = {
+	.turbo_mode	= 0,
+	.single_channel	= 1,	/* 0: slave, 1: master */
+};
+
+static struct spi_board_info omap3_mma7455l_spi_board_info[] __initdata = {
+	{
+		.modalias		= "mma7455l",
+		.bus_num		= 3,
+		.chip_select		= 0,
+		.max_speed_hz		= 200000,
+		.irq			= OMAP_GPIO_IRQ(OMAP3_AC_GPIO),
+		.controller_data	= &mma7455l_mcspi_config,
+		.platform_data		= &mma7455l_config,
+	}
+};
+
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = -EINVAL,
+	.reset_gpio_port[1]  = 147,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
+static int touchbook_backlight_brightness = 50;
+static struct omap_dm_timer *touchbook_backlight_pwm;
+
+static int touchbook_backlight_read(struct backlight_device *bd)
+{
+	return touchbook_backlight_brightness;
+}
+
+static int touchbook_backlight_update(struct backlight_device *bd)
+{
+	int value = bd->props.brightness;
+	touchbook_backlight_brightness = value;
+
+	/* Frequency calculation:
+	   - For 200Hz PWM, you want to load -164 (=> -32768Hz / 200Hz).
+	   - Minimum duty cycle for the backlight is 15%.
+	   - You have (164*0.85) => ~140 levels of brightness.
+	*/
+
+	/* For maximum brightness, just stop the timer... */
+	if (value != bd->props.max_brightness) {
+		/* Load the appropriate value for 200Hz PWM */
+		u32 period = clk_get_rate(omap_dm_timer_get_fclk(
+					touchbook_backlight_pwm)) / 200;
+
+		/* Minimum duty cycle is 15% */
+		u32 minimum = (period * 3) / 20;
+		u32 maximum = (period * 17) / 20;
+
+		/* Work out match value */
+		u32 match = (maximum * value) / 100;
+
+		/* Start... */
+		omap_dm_timer_set_load(touchbook_backlight_pwm,
+					1, 0xFFFFFFFF - period - 1);
+		omap_dm_timer_set_match(touchbook_backlight_pwm,
+					1, 0xFFFFFFFF - minimum - match);
+		omap_dm_timer_write_counter(touchbook_backlight_pwm, -1);
+		omap_dm_timer_start(touchbook_backlight_pwm);
+	} else
+		omap_dm_timer_stop(touchbook_backlight_pwm);
+
+
+	return 0;
+}
+
+static struct backlight_ops touchbook_backlight_properties = {
+	.get_brightness = touchbook_backlight_read,
+	.update_status = touchbook_backlight_update,
+};
+
+static void __init omap3_touchbook_backlight_init(void)
+{
+	static struct backlight_device *bd;
+	bd = backlight_device_register("touchbook", NULL, NULL,
+					&touchbook_backlight_properties);
+
+	if (bd) {
+		touchbook_backlight_pwm = omap_dm_timer_request_specific(
+				TB_BL_PWM_TIMER);
+		omap_dm_timer_enable(touchbook_backlight_pwm);
+		omap_dm_timer_set_source(touchbook_backlight_pwm,
+				OMAP_TIMER_SRC_SYS_CLK);
+		omap_dm_timer_set_pwm(touchbook_backlight_pwm,
+				1, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
+
+		bd->props.max_brightness = 100;
+		bd->props.brightness = touchbook_backlight_brightness;
+	}
+
+	touchbook_backlight_update(bd);
+}
+
+static void omap3_touchbook_poweroff(void)
+{
+	int r;
+
+	r = gpio_request(TB_KILL_POWER_GPIO, "DVI reset");
+	if (r < 0) {
+		printk(KERN_ERR "Unable to get kill power GPIO\n");
+		return;
+	}
+
+	gpio_direction_output(TB_KILL_POWER_GPIO, 0);
+}
+
+static void __init early_touchbook_revision(char **p)
+{
+	if (!*p)
+		return;
+
+	strict_strtoul(*p, 10, &touchbook_revision);
+}
+__early_param("tbr=", early_touchbook_revision);
+
+static void __init omap3_touchbook_init(void)
+{
+	pm_power_off = omap3_touchbook_poweroff;
+
+	omap3_touchbook_i2c_init();
+	platform_add_devices(omap3_touchbook_devices,
+			ARRAY_SIZE(omap3_touchbook_devices));
+	omap_serial_init();
+
+	omap_cfg_reg(J25_34XX_GPIO170);
+	gpio_request(176, "DVI_nPD");
+	/* REVISIT leave DVI powered down until it's needed ... */
+	gpio_direction_output(176, true);
+
+	/* Touchscreen and accelerometer */
+	spi_register_board_info(omap3_ads7846_spi_board_info,
+				ARRAY_SIZE(omap3_ads7846_spi_board_info));
+	spi_register_board_info(omap3_mma7455l_spi_board_info,
+				ARRAY_SIZE(omap3_mma7455l_spi_board_info));
+	omap3_ads7846_init();
+	omap3_mma7455l_init();
+
+	omap3_touchbook_backlight_init();
+
+	usb_musb_init();
+	usb_ehci_init(&ehci_pdata);
+	omap3touchbook_flash_init();
+
+	/* Ensure SDRC pins are mux'd for self-refresh */
+	omap_cfg_reg(H16_34XX_SDRC_CKE0);
+	omap_cfg_reg(H17_34XX_SDRC_CKE1);
+}
+
+static void __init omap3_touchbook_map_io(void)
+{
+	omap2_set_globals_343x();
+	omap2_map_common_io();
+}
+
+MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
+	/* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
+	.phys_io	= 0x48000000,
+	.io_pg_offst	= ((0xd8000000) >> 18) & 0xfffc,
+	.boot_params	= 0x80000100,
+	.map_io		= omap3_touchbook_map_io,
+	.init_irq	= omap3_touchbook_init_irq,
+	.init_machine	= omap3_touchbook_init,
+	.timer		= &omap_timer,
+MACHINE_END
-- 
1.6.0.4

--
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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/8] Freescale MMA7455 accelerometer driver
  2009-11-19 17:18   ` [PATCH 2/8] Board " Gregoire Gentil
@ 2009-11-19 17:18     ` Gregoire Gentil
  2009-11-19 17:18       ` [PATCH 4/8] Driver for Always Innovating OMAP3-based Touch Book keyboard Gregoire Gentil
  2009-11-19 19:24       ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Jonathan Cameron
  2009-11-20  4:20     ` [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book Hiremath, Vaibhav
  1 sibling, 2 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin, linux-input


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 drivers/input/misc/Kconfig    |    9 +
 drivers/input/misc/Makefile   |    2 +-
 drivers/input/misc/mma7455l.c |  626 +++++++++++++++++++++++++++++++++++++++++
 include/linux/mma7455l.h      |   11 +
 4 files changed, 647 insertions(+), 1 deletions(-)
 create mode 100644 drivers/input/misc/mma7455l.c
 create mode 100644 include/linux/mma7455l.h

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index a9bb254..454bac7 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -317,4 +317,13 @@ config INPUT_PCAP
 	  To compile this driver as a module, choose M here: the
 	  module will be called pcap_keys.
 
+config INPUT_MMA7455L
+	tristate "Freescale MMA7455L 3-axis accelerometer"
+	depends on SPI_MASTER
+	help
+	  SPI driver for the Freescale MMA7455L 3-axis accelerometer.
+
+	  The userspace interface is a 3-axis (X/Y/Z) relative movement
+	  Linux input device, reporting REL_[XYZ] events.
+
 endif
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index a8b8485..3db6347 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -30,4 +30,4 @@ obj-$(CONFIG_INPUT_WINBOND_CIR)		+= winbond-cir.o
 obj-$(CONFIG_INPUT_WISTRON_BTNS)	+= wistron_btns.o
 obj-$(CONFIG_INPUT_WM831X_ON)		+= wm831x-on.o
 obj-$(CONFIG_INPUT_YEALINK)		+= yealink.o
-
+obj-$(CONFIG_INPUT_MMA7455L)		+= mma7455l.o
diff --git a/drivers/input/misc/mma7455l.c b/drivers/input/misc/mma7455l.c
new file mode 100644
index 0000000..d415bb0
--- /dev/null
+++ b/drivers/input/misc/mma7455l.c
@@ -0,0 +1,626 @@
+/* Linux kernel driver for the Freescale MMA7455L 3-axis accelerometer
+ *
+ * Copyright (C) 2009 by Always Innovating, Inc.
+ * Author: Gregoire Gentil <gregoire@gentil.com>
+ * Author: Tim Yamin <plasm@roo.me.uk>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+/*
+ * What this driver doesn't yet support:
+ *
+ * - I2C
+ * - INT2 handling
+ * - Pulse detection (and the sysctls to control it)
+ * - 10-bit measurement
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/input.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/sysfs.h>
+#include <linux/gpio.h>
+
+#include <linux/mma7455l.h>
+#include <linux/spi/spi.h>
+
+#define MMA7455L_WHOAMI_MAGIC		0x55
+
+enum mma7455l_reg {
+	MMA7455L_REG_XOUTL		= 0x00,
+	MMA7455L_REG_XOUTH		= 0x01,
+	MMA7455L_REG_YOUTL		= 0x02,
+	MMA7455L_REG_YOUTH		= 0x03,
+	MMA7455L_REG_ZOUTL 		= 0x04,
+	MMA7455L_REG_ZOUTH		= 0x05,
+	MMA7455L_REG_XOUT8		= 0x06,
+	MMA7455L_REG_YOUT8		= 0x07,
+	MMA7455L_REG_ZOUT8		= 0x08,
+	MMA7455L_REG_STATUS		= 0x09,
+	MMA7455L_REG_DETSRC		= 0x0a,
+	MMA7455L_REG_TOUT		= 0x0b,
+	MMA7455L_REG_RESERVED1		= 0x0c,
+	MMA7455L_REG_I2CAD		= 0x0d,
+	MMA7455L_REG_USRINF		= 0x0e,
+	MMA7455L_REG_WHOAMI		= 0x0f,
+	MMA7455L_REG_XOFFL		= 0x10,
+	MMA7455L_REG_XOFFH		= 0x11,
+	MMA7455L_REG_YOFFL		= 0x12,
+	MMA7455L_REG_YOFFH		= 0x13,
+	MMA7455L_REG_ZOFFL		= 0x14,
+	MMA7455L_REG_ZOFFH		= 0x15,
+	MMA7455L_REG_MCTL		= 0x16,
+	MMA7455L_REG_INTRST		= 0x17,
+	MMA7455L_REG_CTL1		= 0x18,
+	MMA7455L_REG_CTL2		= 0x19,
+	MMA7455L_REG_LDTH		= 0x1a,
+	MMA7455L_REG_PDTH		= 0x1b,
+	MMA7455L_REG_PW			= 0x1c,
+	MMA7455L_REG_LT			= 0x1d,
+	MMA7455L_REG_TW			= 0x1e,
+	MMA7455L_REG_RESERVED2		= 0x1f,
+};
+
+enum mma7455l_reg_status {
+	MMA7455L_STATUS_XDA		= 0x08,
+	MMA7455L_STATUS_YDA		= 0x10,
+	MMA7455L_STATUS_ZDA		= 0x20,
+};
+
+enum mma7455l_mode {
+	MMA7455L_MODE_STANDBY		= 0,
+	MMA7455L_MODE_MEASUREMENT	= 1,
+	MMA7455L_MODE_LEVELDETECTION	= 0x42, /* Set DRPD to on */
+	MMA7455L_MODE_PULSEDETECTION	= 0x43, /* Set DRPD to on */
+	MMA7455L_MODE_MASK		= 0x43,
+};
+
+enum mma7455l_gselect {
+	MMA7455L_GSELECT_8		= 0x0,
+	MMA7455L_GSELECT_2		= 0x4,
+	MMA7455L_GSELECT_4		= 0x8,
+	MMA7455L_GSELECT_MASK		= 0xC,
+};
+
+/* FIXME */
+#define MMA7455L_F_FS			0x0020 	/* ADC full scale */
+
+
+struct mma7455l_info {
+	struct spi_device *spi_dev;
+	struct input_dev *input_dev;
+	struct mutex lock;		/* Struct mutex lock */
+	struct delayed_work work;
+
+	u8 mode;
+	u8 gSelect;
+
+	u8 flags;
+	u8 working;
+};
+
+/* lowlevel register access functions */
+
+#define WRITE_BIT	(1 << 7)
+#define ADDR_SHIFT	1
+
+static inline u_int8_t __reg_read(struct mma7455l_info *mma, u_int8_t reg)
+{
+	int rc;
+	u_int8_t cmd;
+
+	cmd = ((reg & 0x3f) << ADDR_SHIFT);
+	rc = spi_w8r8(mma->spi_dev, cmd);
+
+	return rc;
+}
+
+static u_int8_t reg_read(struct mma7455l_info *mma, u_int8_t reg)
+{
+	u_int8_t ret;
+
+	mutex_lock(&mma->lock);
+	ret = __reg_read(mma, reg);
+	mutex_unlock(&mma->lock);
+
+	return ret;
+}
+
+static s16 __reg_read_10(struct mma7455l_info *mma, u8 reg1, u8 reg2)
+{
+	u8 v1, v2;
+
+	v1 = __reg_read(mma, reg1);
+	v2 = __reg_read(mma, reg2);
+
+	return (v2 & 0x4) << 13 | (v2 & 0x3) << 8 | v1;
+}
+
+static inline int __reg_write(struct mma7455l_info *mma,
+				u_int8_t reg, u_int8_t val)
+{
+	u_int8_t buf[2];
+
+	buf[0] = ((reg & 0x3f) << ADDR_SHIFT) | WRITE_BIT;
+	buf[1] = val;
+
+	return spi_write(mma->spi_dev, buf, sizeof(buf));
+}
+
+static int reg_write(struct mma7455l_info *mma, u_int8_t reg, u_int8_t val)
+{
+	int ret;
+
+	mutex_lock(&mma->lock);
+	ret = __reg_write(mma, reg, val);
+	mutex_unlock(&mma->lock);
+
+	return ret;
+}
+
+static s16 __reg_write_10(struct mma7455l_info *mma,
+				u8 reg1, u8 reg2, s16 value)
+{
+	int ret;
+	u8 v1, v2;
+
+	v1 = value & 0xFF;
+	if (value < 0)
+		v2 = ((value >> 8) & 0x3) | 0x4;
+	else
+		v2 = 0;
+
+	ret = __reg_write(mma, reg1, v1);
+	ret = __reg_write(mma, reg2, v2);
+	return ret;
+}
+
+static void mma7455l_work(struct work_struct *work)
+{
+	struct mma7455l_info *mma =
+			container_of(work, struct mma7455l_info, work.work);
+
+	s8 val;
+	mma->working = 1;
+
+	/* FIXME: 10 bit accuracy? */
+	if (!(mma->flags & MMA7455L_STATUS_XDA)) {
+		val = reg_read(mma, MMA7455L_REG_XOUT8);
+		input_report_abs(mma->input_dev, ABS_X, val);
+	}
+	if (!(mma->flags & MMA7455L_STATUS_YDA)) {
+		val = reg_read(mma, MMA7455L_REG_YOUT8);
+		input_report_abs(mma->input_dev, ABS_Y, val);
+	}
+	if (!(mma->flags & MMA7455L_STATUS_ZDA)) {
+		val = reg_read(mma, MMA7455L_REG_ZOUT8);
+		input_report_abs(mma->input_dev, ABS_Z, val);
+	}
+
+	mma->working = 0;
+	input_sync(mma->input_dev);
+	put_device(&mma->spi_dev->dev);
+
+	/* Enable IRQ and clear out interrupt */
+	reg_write(mma, MMA7455L_REG_INTRST, 0x3);
+	reg_write(mma, MMA7455L_REG_INTRST, 0x0);
+	enable_irq(mma->spi_dev->irq);
+}
+
+static void mma7455l_schedule_work(struct mma7455l_info *mma)
+{
+	int status;
+
+	get_device(&mma->spi_dev->dev);
+	status = schedule_delayed_work(&mma->work, HZ / 10);
+}
+
+static irqreturn_t mma7455l_interrupt(int irq, void *_mma)
+{
+	struct mma7455l_info *mma = _mma;
+	mma7455l_schedule_work(mma);
+
+	/* Disable any further interrupts until we have processed
+	 * the current one */
+	disable_irq(mma->spi_dev->irq);
+	return IRQ_HANDLED;
+}
+
+/* sysfs */
+
+static void get_mode(struct mma7455l_info *mma, u8 *mode, u8 *gSelect)
+{
+	u8 tmp = reg_read(mma, MMA7455L_REG_MCTL);
+
+	*mode = tmp & MMA7455L_MODE_MASK;
+	*gSelect = tmp & MMA7455L_GSELECT_MASK;
+}
+
+static void set_mode(struct mma7455l_info *mma, u8 mode, u8 gSelect)
+{
+	reg_write(mma, MMA7455L_REG_MCTL, mode | gSelect);
+}
+
+static void update_mode(struct mma7455l_info *mma, u8 mode, u8 gSelect)
+{
+	mma->mode = mode;
+	mma->gSelect = gSelect;
+
+	reg_write(mma, MMA7455L_REG_MCTL, mma->mode | mma->gSelect);
+}
+
+static ssize_t show_measure(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+	s8 x, y, z;
+	u8 old_Mode, old_gSelect;
+
+	get_mode(mma, &old_Mode, &old_gSelect);
+	set_mode(mma, MMA7455L_MODE_MEASUREMENT, MMA7455L_GSELECT_2);
+
+	while (reg_read(mma, MMA7455L_REG_STATUS) == 0)
+		msleep(10);
+
+	x = reg_read(mma, MMA7455L_REG_XOUT8);
+	y = reg_read(mma, MMA7455L_REG_YOUT8);
+	z = reg_read(mma, MMA7455L_REG_ZOUT8);
+
+	set_mode(mma, old_Mode, old_gSelect);
+	return sprintf(buf, "%d %d %d\n", x, y, z);
+}
+
+static ssize_t show_mode(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	switch (mma->mode) {
+	case MMA7455L_MODE_STANDBY:
+		return sprintf(buf, "Standby\n");
+		break;
+	case MMA7455L_MODE_MEASUREMENT:
+		return sprintf(buf, "Measurement\n");
+		break;
+	case MMA7455L_MODE_LEVELDETECTION:
+		return sprintf(buf, "Level Detection\n");
+		break;
+	case MMA7455L_MODE_PULSEDETECTION:
+		return sprintf(buf, "Pulse Detection\n");
+		break;
+	}
+
+	return sprintf(buf, "Unknown mode!\n");
+}
+
+static ssize_t show_gSelect(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	switch (mma->gSelect) {
+	case MMA7455L_GSELECT_8:
+		return sprintf(buf, "8\n");
+		break;
+	case MMA7455L_GSELECT_4:
+		return sprintf(buf, "4\n");
+		break;
+	case MMA7455L_GSELECT_2:
+		return sprintf(buf, "2\n");
+		break;
+	}
+
+	return sprintf(buf, "Unknown gSelect!\n");
+}
+
+static ssize_t show_level_threshold(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+	return sprintf(buf, "%u\n", reg_read(mma, MMA7455L_REG_LDTH));
+}
+
+static ssize_t show_calibration(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	s16 x, y, z;
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	mutex_lock(&mma->lock);
+	x = __reg_read_10(mma, MMA7455L_REG_XOFFL, MMA7455L_REG_XOFFH);
+	y = __reg_read_10(mma, MMA7455L_REG_YOFFL, MMA7455L_REG_YOFFH);
+	z = __reg_read_10(mma, MMA7455L_REG_ZOFFL, MMA7455L_REG_ZOFFH);
+	mutex_unlock(&mma->lock);
+
+	return sprintf(buf, "%d %d %d\n", x, y, z);
+}
+
+static ssize_t write_mode(struct device *dev,
+		struct device_attribute *attr, const char *buf, size_t count)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	if (!strncmp(buf, "Standby", count))
+		update_mode(mma, MMA7455L_MODE_STANDBY, mma->gSelect);
+	else if (!strncmp(buf, "Measurement", count))
+		update_mode(mma, MMA7455L_MODE_MEASUREMENT, mma->gSelect);
+	else if (!strncmp(buf, "Level Detection", count))
+		update_mode(mma, MMA7455L_MODE_LEVELDETECTION, mma->gSelect);
+	else if (!strncmp(buf, "Pulse Detection", count))
+		update_mode(mma, MMA7455L_MODE_PULSEDETECTION, mma->gSelect);
+
+	return count;
+}
+
+static ssize_t write_gSelect(struct device *dev,
+		struct device_attribute *attr, const char *buf, size_t count)
+{
+	unsigned long v;
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	if (strict_strtoul(buf, 10, &v) == 0) {
+		switch (v) {
+		case 8:
+			update_mode(mma, mma->mode, MMA7455L_GSELECT_8);
+			break;
+		case 4:
+			update_mode(mma, mma->mode, MMA7455L_GSELECT_4);
+			break;
+		case 2:
+			update_mode(mma, mma->mode, MMA7455L_GSELECT_2);
+			break;
+		default:
+			return -EINVAL;
+			break;
+		}
+		return count;
+	}
+
+	return -EINVAL;
+}
+
+static ssize_t write_level_threshold(struct device *dev,
+		struct device_attribute *attr, const char *buf, size_t count)
+{
+	unsigned long v;
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	if (strict_strtoul(buf, 10, &v) == 0) {
+		if (v <= 0xFF) {
+			reg_write(mma, MMA7455L_REG_LDTH, v);
+			return count;
+		} else
+			return -EINVAL;
+	}
+
+	return -EINVAL;
+}
+
+static ssize_t write_calibration(struct device *dev,
+		struct device_attribute *attr, const char *buf, size_t count)
+{
+	int x, y, z;
+	struct mma7455l_info *mma = dev_get_drvdata(dev);
+
+	if (sscanf(buf, "%d %d %d", &x, &y, &z) == 3) {
+		mutex_lock(&mma->lock);
+		__reg_write_10(mma, MMA7455L_REG_XOFFL, MMA7455L_REG_XOFFH, x);
+		__reg_write_10(mma, MMA7455L_REG_YOFFL, MMA7455L_REG_YOFFH, y);
+		__reg_write_10(mma, MMA7455L_REG_ZOFFL, MMA7455L_REG_ZOFFH, z);
+		mutex_unlock(&mma->lock);
+
+		return count;
+	}
+
+	return -EINVAL;
+}
+
+static DEVICE_ATTR(measure, S_IRUGO, show_measure, NULL);
+static DEVICE_ATTR(mode, S_IRUGO | S_IWUGO, show_mode, write_mode);
+static DEVICE_ATTR(gSelect, S_IRUGO | S_IWUGO, show_gSelect, write_gSelect);
+static DEVICE_ATTR(level_threshold, S_IRUGO | S_IWUGO, show_level_threshold,
+			write_level_threshold);
+static DEVICE_ATTR(calibration, S_IRUGO | S_IWUGO, show_calibration,
+			write_calibration);
+
+static struct attribute *mma7455l_sysfs_entries[] = {
+       &dev_attr_measure.attr,
+	&dev_attr_mode.attr,
+	&dev_attr_gSelect.attr,
+	&dev_attr_level_threshold.attr,
+	&dev_attr_calibration.attr,
+	NULL
+};
+
+static struct attribute_group mma7455l_attr_group = {
+       .attrs  = mma7455l_sysfs_entries,
+};
+
+/* input device handling and driver core interaction */
+static int mma7455l_input_open(struct input_dev *inp)
+{
+	struct mma7455l_info *mma = input_get_drvdata(inp);
+	if (mma->mode == MMA7455L_MODE_STANDBY)
+		update_mode(mma, MMA7455L_MODE_MEASUREMENT, mma->gSelect);
+
+	return 0;
+}
+
+static void mma7455l_input_close(struct input_dev *inp)
+{
+	struct mma7455l_info *mma = input_get_drvdata(inp);
+	update_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
+}
+
+static int __devinit mma7455l_probe(struct spi_device *spi)
+{
+	int rc;
+	struct mma7455l_info *mma;
+	struct mma7455l_platform_data *pdata = spi->dev.platform_data;
+	u_int8_t wai;
+
+	mma = kzalloc(sizeof(*mma), GFP_KERNEL);
+	if (!mma)
+		return -ENOMEM;
+
+	mutex_init(&mma->lock);
+	INIT_DELAYED_WORK(&mma->work, mma7455l_work);
+	mma->spi_dev = spi;
+	mma->flags = 0;
+	mma->working = 0;
+
+	spi_set_drvdata(spi, mma);
+
+	rc = spi_setup(spi);
+	if (rc < 0) {
+		printk(KERN_ERR
+			"mma7455l error durign spi_setup of mma7455l driver\n");
+		dev_set_drvdata(&spi->dev, NULL);
+		kfree(mma);
+		return rc;
+	}
+
+	wai = reg_read(mma, MMA7455L_REG_WHOAMI);
+	if (wai != MMA7455L_WHOAMI_MAGIC) {
+		printk(KERN_ERR
+			"mma7455l unknown whoami signature 0x%02x\n", wai);
+		dev_set_drvdata(&spi->dev, NULL);
+		kfree(mma);
+		return -ENODEV;
+	}
+
+	rc = request_irq(mma->spi_dev->irq, mma7455l_interrupt,
+			IRQF_TRIGGER_HIGH, "mma7455l", mma);
+	if (rc < 0) {
+		dev_err(&spi->dev, "mma7455l error requesting IRQ %d\n",
+			mma->spi_dev->irq);
+		/* FIXME */
+		return rc;
+	}
+
+	rc = sysfs_create_group(&spi->dev.kobj, &mma7455l_attr_group);
+	if (rc) {
+		dev_err(&spi->dev, "error creating sysfs group\n");
+		return rc;
+	}
+
+	/* initialize input layer details */
+	mma->input_dev = input_allocate_device();
+	if (!mma->input_dev) {
+		dev_err(&spi->dev,
+			"mma7455l Unable to allocate input device\n");
+		/* FIXME */
+	}
+
+	set_bit(EV_ABS, mma->input_dev->evbit);
+	set_bit(ABS_X, mma->input_dev->absbit);
+	set_bit(ABS_Y, mma->input_dev->absbit);
+	set_bit(ABS_Z, mma->input_dev->absbit);
+
+	input_set_drvdata(mma->input_dev, mma);
+	mma->input_dev->name = "MMA7455L";
+	mma->input_dev->open = mma7455l_input_open;
+	mma->input_dev->close = mma7455l_input_close;
+
+	rc = input_register_device(mma->input_dev);
+	if (!rc) {
+		update_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
+
+		mutex_lock(&mma->lock);
+		__reg_write_10(mma, MMA7455L_REG_XOFFL,
+				MMA7455L_REG_XOFFH, pdata->calibration_x);
+		__reg_write_10(mma, MMA7455L_REG_YOFFL,
+				MMA7455L_REG_YOFFH, pdata->calibration_y);
+		__reg_write_10(mma, MMA7455L_REG_ZOFFL,
+				MMA7455L_REG_ZOFFH, pdata->calibration_z);
+		mutex_unlock(&mma->lock);
+
+		return 0;
+	}
+
+	input_free_device(mma->input_dev);
+	return rc;
+}
+
+static int __devexit mma7455l_remove(struct spi_device *spi)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
+
+	sysfs_remove_group(&spi->dev.kobj, &mma7455l_attr_group);
+	input_unregister_device(mma->input_dev);
+	dev_set_drvdata(&spi->dev, NULL);
+	kfree(mma);
+
+	return 0;
+}
+
+#ifdef CONFIG_PM
+static int mma7455l_suspend(struct spi_device *spi, pm_message_t message)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
+	get_mode(mma, &mma->mode, &mma->gSelect);
+	set_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
+
+	return 0;
+}
+
+static int mma7455l_resume(struct spi_device *spi)
+{
+	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
+	update_mode(mma, mma->mode, mma->gSelect);
+
+	return 0;
+}
+#else
+#define mma7455l_suspend NULL
+#define mma7455l_resume  NULL
+#endif
+
+static struct spi_driver mma7455l_driver = {
+	.driver = {
+		.name	= "mma7455l",
+		.owner	= THIS_MODULE,
+	},
+
+	.probe	 = mma7455l_probe,
+	.remove	 = __devexit_p(mma7455l_remove),
+	.suspend = mma7455l_suspend,
+	.resume	 = mma7455l_resume,
+};
+
+static int __init mma7455l_init(void)
+{
+	return spi_register_driver(&mma7455l_driver);
+}
+
+static void __exit mma7455l_exit(void)
+{
+	spi_unregister_driver(&mma7455l_driver);
+}
+
+MODULE_AUTHOR("Gregoire Gentil <gregoire@gentil.com>");
+MODULE_LICENSE("GPL");
+
+module_init(mma7455l_init);
diff --git a/include/linux/mma7455l.h b/include/linux/mma7455l.h
new file mode 100644
index 0000000..12ab50a
--- /dev/null
+++ b/include/linux/mma7455l.h
@@ -0,0 +1,11 @@
+#ifndef _LINUX_MMA7455L_H
+#define _LINUX_MMA7455L_H
+
+struct mma7455l_platform_data {
+	/* Calibration offsets */
+	s16 calibration_x;
+	s16 calibration_y;
+	s16 calibration_z;
+};
+
+#endif /* _LINUX_MMA7455L_H */
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/8] Driver for Always Innovating OMAP3-based Touch Book keyboard
  2009-11-19 17:18     ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Gregoire Gentil
@ 2009-11-19 17:18       ` Gregoire Gentil
  2009-11-19 17:18         ` [PATCH 5/8] HID file " Gregoire Gentil
  2009-11-19 19:24       ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Jonathan Cameron
  1 sibling, 1 reply; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin, linux-input


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 drivers/hid/Kconfig    |    7 +++++++
 drivers/hid/Makefile   |    1 +
 drivers/hid/hid-core.c |    1 +
 drivers/hid/hid-ids.h  |    3 +++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 24d90ea..b56ddc5 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -62,6 +62,13 @@ config HID_A4TECH
 	---help---
 	Support for A4 tech X5 and WOP-35 / Trust 450L mice.
 
+config HID_ALWAYSINNOVATING
+	tristate "Always Innovating" if EMBEDDED
+	depends on USB_HID
+	default !EMBEDDED
+	---help---
+	Support for Always Innovating Touch Book.
+
 config HID_APPLE
 	tristate "Apple" if EMBEDDED
 	depends on (USB_HID || BT_HIDP)
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 0de2dff..b6a2860 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -20,6 +20,7 @@ ifdef CONFIG_LOGIRUMBLEPAD2_FF
 endif
 
 obj-$(CONFIG_HID_A4TECH)	+= hid-a4tech.o
+obj-$(CONFIG_HID_ALWAYSINNOVATING)	+= hid-alwaysinnovating.o
 obj-$(CONFIG_HID_APPLE)		+= hid-apple.o
 obj-$(CONFIG_HID_BELKIN)	+= hid-belkin.o
 obj-$(CONFIG_HID_CHERRY)	+= hid-cherry.o
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 7d05c4b..2bb62c3 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1252,6 +1252,7 @@ EXPORT_SYMBOL_GPL(hid_disconnect);
 static const struct hid_device_id hid_blacklist[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ALWAYSINNOVATING, USB_DEVICE_ID_ALWAYSINNOVATING_TOUCH_BOOK) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index adbef5d..ebf53f7 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -54,6 +54,9 @@
 #define USB_VENDOR_ID_ALPS		0x0433
 #define USB_DEVICE_ID_IBM_GAMEPAD	0x1101
 
+#define USB_VENDOR_ID_ALWAYSINNOVATING		0xa110
+#define USB_DEVICE_ID_ALWAYSINNOVATING_TOUCH_BOOK	0x0002
+
 #define USB_VENDOR_ID_APPLE		0x05ac
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI	0x020e
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/8] HID file for Always Innovating OMAP3-based Touch Book keyboard
  2009-11-19 17:18       ` [PATCH 4/8] Driver for Always Innovating OMAP3-based Touch Book keyboard Gregoire Gentil
@ 2009-11-19 17:18         ` Gregoire Gentil
  2009-11-19 17:18           ` [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book Gregoire Gentil
  2009-11-19 17:37           ` [PATCH 5/8] HID file for Always Innovating OMAP3-based Touch Book keyboard Koen Kooi
  0 siblings, 2 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin, linux-input


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 drivers/hid/hid-alwaysinnovating.c |  262 ++++++++++++++++++++++++++++++++++++
 1 files changed, 262 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-alwaysinnovating.c

diff --git a/drivers/hid/hid-alwaysinnovating.c b/drivers/hid/hid-alwaysinnovating.c
new file mode 100644
index 0000000..a7bb0fd
--- /dev/null
+++ b/drivers/hid/hid-alwaysinnovating.c
@@ -0,0 +1,262 @@
+/*
+ *  USB HID quirks support for the Always Innovating Touch Book
+ *  Code borrowed from hid-apple.c
+ *
+ *  Copyright (c) 2009 Gregoire Gentil <gregoire@gentil.com>
+ *  Copyright (c) 2009 Tim Yamin <plasm@roo.me.uk>
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ */
+
+#include <linux/device.h>
+#include <linux/hid.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#include "hid-ids.h"
+
+struct touchbook_sc {
+	unsigned long quirks;
+	unsigned int  fn_on;
+	DECLARE_BITMAP(pressed_fn, KEY_CNT);
+};
+
+struct touchbook_key_translation {
+	u16 from;
+	u16 to;
+	u8 flags;
+};
+
+static struct touchbook_key_translation touchbook_fn_keys[] = {
+	{ KEY_F6,	KEY_BRIGHTNESSDOWN },
+	{ KEY_F7,	KEY_BRIGHTNESSUP },
+
+	{ KEY_F8,	KEY_MUTE },
+	{ KEY_F9,	KEY_VOLUMEDOWN },
+	{ KEY_F10,	KEY_VOLUMEUP },
+
+	{ KEY_UP,	KEY_PAGEUP },
+	{ KEY_DOWN,	KEY_PAGEDOWN },
+	{ }
+};
+
+extern unsigned long touchbook_revision;
+unsigned long swap_key;
+
+static struct touchbook_key_translation *touchbook_find_translation(
+		struct touchbook_key_translation *table, u16 from)
+{
+	struct touchbook_key_translation *trans;
+
+	/* Look for the translation */
+	for (trans = table; trans->from; trans++)
+		if (trans->from == from)
+			return trans;
+
+	return NULL;
+}
+
+static int touchbook_event(struct hid_device *hid, struct hid_field *field,
+		struct hid_usage *usage, __s32 value)
+{
+	int do_translate;
+
+	struct input_dev *input = field->hidinput->input;
+	struct touchbook_sc *asc = hid_get_drvdata(hid);
+	struct touchbook_key_translation *trans;
+
+	if (swap_key && usage->code == KEY_RIGHTSHIFT) {
+		input_event(input, usage->type, KEY_END, value);
+		return 1;
+	}
+
+	if (swap_key && usage->code == KEY_END) {
+		input_event(input, usage->type, KEY_RIGHTSHIFT, value);
+		return 1;
+	}
+
+	if (usage->code == KEY_POWER) {
+		asc->fn_on = !!value;
+		input_event(input, usage->type, usage->code, value);
+		return 1;
+	}
+
+	trans = touchbook_find_translation(touchbook_fn_keys, usage->code);
+	if (trans) {
+		if (test_bit(usage->code, asc->pressed_fn))
+			do_translate = 1;
+		else
+			do_translate = asc->fn_on;
+
+		if (do_translate) {
+			if (value)
+				set_bit(usage->code, asc->pressed_fn);
+			else
+				clear_bit(usage->code, asc->pressed_fn);
+
+			input_event(input, usage->type, trans->to,
+					value);
+
+			return 1;
+		}
+	}
+
+	return 0;
+}
+
+static int touchbook_input_mapping(struct hid_device *hdev,
+		struct hid_input *hi,
+		struct hid_field *field, struct hid_usage *usage,
+		unsigned long **bit, int *max)
+{
+	struct touchbook_key_translation *trans;
+
+	/* Enable all other keys */
+	for (trans = touchbook_fn_keys; trans->from; trans++)
+		set_bit(trans->to, hi->input->keybit);
+
+	return 0;
+}
+
+static ssize_t show_swap_key(struct device *dev,
+		struct device_attribute *attr, char *buf)
+{
+	return snprintf(buf, PAGE_SIZE, "%lu\n", swap_key);
+}
+
+static ssize_t store_swap_key(struct device *dev,
+		struct device_attribute *attr,
+		const char *buf, size_t count)
+{
+	 strict_strtoul(buf, 10, &swap_key);
+
+	if (swap_key != 0 && swap_key != 1) {
+		swap_key = 0;
+		return -EINVAL;
+	}
+
+	return count;
+}
+
+static struct device_attribute touchbook_hid_attrs[] = {
+	__ATTR(swap_key, S_IRUGO | S_IWUGO, show_swap_key, store_swap_key),
+};
+
+int touchbook_create_sysfs(struct hid_device *hdev)
+{
+	int i;
+	int r;
+
+	for (i = 0; i < ARRAY_SIZE(touchbook_hid_attrs); i++) {
+		r = device_create_file(&hdev->dev,
+				&touchbook_hid_attrs[i]);
+
+		if (r) {
+			dev_err(&hdev->dev, "failed to create sysfs file\n");
+			return r;
+		}
+	}
+
+	return 0;
+}
+
+void touchbook_remove_sysfs(struct hid_device *hdev)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(touchbook_hid_attrs); i++)
+		device_remove_file(&hdev->dev,
+					&touchbook_hid_attrs[i]);
+}
+
+static int touchbook_probe(struct hid_device *hdev,
+		const struct hid_device_id *id)
+{
+	unsigned long quirks = id->driver_data;
+	struct touchbook_sc *asc;
+	unsigned int connect_mask = HID_CONNECT_DEFAULT;
+	int ret;
+
+	asc = kzalloc(sizeof(*asc), GFP_KERNEL);
+	if (asc == NULL) {
+		dev_err(&hdev->dev, "can't alloc touchbook descriptor\n");
+		return -ENOMEM;
+	}
+
+	asc->quirks = quirks;
+	hid_set_drvdata(hdev, asc);
+
+	ret = hid_parse(hdev);
+	if (ret) {
+		dev_err(&hdev->dev, "parse failed\n");
+		goto err_free;
+	}
+
+	ret = touchbook_create_sysfs(hdev);
+	if (ret) {
+		dev_err(&hdev->dev, "failed to create sysfs entries\n");
+		goto err_free;
+	}
+
+	swap_key = (touchbook_revision >= 4) ? 1 : 0;
+
+	ret = hid_hw_start(hdev, connect_mask);
+	if (ret) {
+		dev_err(&hdev->dev, "hw start failed\n");
+		goto err_free;
+	}
+
+	return 0;
+err_free:
+	kfree(asc);
+	return ret;
+}
+
+static void touchbook_remove(struct hid_device *hdev)
+{
+	hid_hw_stop(hdev);
+	kfree(hid_get_drvdata(hdev));
+	touchbook_remove_sysfs(hdev);
+}
+
+static const struct hid_device_id touchbook_devices[] = {
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ALWAYSINNOVATING,
+		USB_DEVICE_ID_ALWAYSINNOVATING_TOUCH_BOOK) },
+	{ }
+};
+
+MODULE_DEVICE_TABLE(hid, touchbook_devices);
+
+static struct hid_driver touchbook_driver = {
+	.name = "touchbook",
+	.id_table = touchbook_devices,
+	.probe = touchbook_probe,
+	.remove = touchbook_remove,
+	.event = touchbook_event,
+	.input_mapping = touchbook_input_mapping,
+};
+
+static int touchbook_init(void)
+{
+	int ret;
+
+	ret = hid_register_driver(&touchbook_driver);
+	if (ret)
+		printk(KERN_ERR "can't register touchbook driver\n");
+
+	return ret;
+}
+
+static void touchbook_exit(void)
+{
+	hid_unregister_driver(&touchbook_driver);
+}
+
+module_init(touchbook_init);
+module_exit(touchbook_exit);
+MODULE_LICENSE("GPL");
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18         ` [PATCH 5/8] HID file " Gregoire Gentil
@ 2009-11-19 17:18           ` Gregoire Gentil
  2009-11-19 17:18             ` [PATCH 7/8] Video " Gregoire Gentil
  2009-11-23 15:35             ` [alsa-devel] [PATCH 6/8] Audio " Mark Brown
  2009-11-19 17:37           ` [PATCH 5/8] HID file for Always Innovating OMAP3-based Touch Book keyboard Koen Kooi
  1 sibling, 2 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin, alsa-devel


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 sound/soc/omap/Kconfig          |    8 ++
 sound/soc/omap/Makefile         |    2 +
 sound/soc/omap/omap3touchbook.c |  211 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 221 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3touchbook.c

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 653a362..c590252 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -83,6 +83,14 @@ config SND_OMAP_SOC_OMAP3_PANDORA
 	help
 	  Say Y if you want to add support for SoC audio on the OMAP3 Pandora.
 
+config SND_OMAP_SOC_OMAP3_TOUCHBOOK
+	tristate "SoC Audio support for OMAP3 Touch Book"
+	depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_TOUCHBOOK
+	select SND_OMAP_SOC_MCBSP
+	select SND_SOC_TWL4030
+	help
+	  Say Y if you want to add support for SoC audio on the OMAP3 Touch Book.
+
 config SND_OMAP_SOC_OMAP3_BEAGLE
 	tristate "SoC Audio support for OMAP3 Beagle"
 	depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_BEAGLE
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 02d6947..f360b82 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -15,6 +15,7 @@ snd-soc-omap3evm-objs := omap3evm.o
 snd-soc-sdp3430-objs := sdp3430.o
 snd-soc-omap3pandora-objs := omap3pandora.o
 snd-soc-omap3beagle-objs := omap3beagle.o
+snd-soc-omap3touchbook-objs := omap3touchbook.o
 snd-soc-zoom2-objs := zoom2.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
@@ -26,4 +27,5 @@ obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
 obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
+obj-$(CONFIG_SND_OMAP_SOC_OMAP3_TOUCHBOOK) += snd-soc-omap3touchbook.o
 obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
diff --git a/sound/soc/omap/omap3touchbook.c b/sound/soc/omap/omap3touchbook.c
new file mode 100644
index 0000000..584f07d
--- /dev/null
+++ b/sound/soc/omap/omap3touchbook.c
@@ -0,0 +1,211 @@
+/*
+ * omap3touchbook.c  --  SoC audio for OMAP3 Touch Book
+ *
+ * Author: Gregoire Gentil <gregoire@gentil.com>
+ *
+ * Derived from sound/soc/omap/omap3beagle.c
+ *
+ * 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
+ *
+ */
+
+#include <linux/clk.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <plat/mcbsp.h>
+
+#include "omap-mcbsp.h"
+#include "omap-pcm.h"
+#include "../codecs/twl4030.h"
+
+#define TB_HEADPHONE_GPIO 56
+#define TB_HEADPHONE_IRQ  OMAP_GPIO_IRQ(TB_HEADPHONE_GPIO)
+
+static int omap3touchbook_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+	unsigned int fmt;
+	int ret;
+
+	switch (params_channels(params)) {
+	case 2: /* Stereo I2S mode */
+		fmt =	SND_SOC_DAIFMT_I2S |
+			SND_SOC_DAIFMT_NB_NF |
+			SND_SOC_DAIFMT_CBM_CFM;
+		break;
+	case 4: /* Four channel TDM mode */
+		fmt =	SND_SOC_DAIFMT_DSP_A |
+			SND_SOC_DAIFMT_IB_NF |
+			SND_SOC_DAIFMT_CBM_CFM;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	/* Set codec DAI configuration */
+	ret = snd_soc_dai_set_fmt(codec_dai, fmt);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set codec DAI configuration\n");
+		return ret;
+	}
+
+	/* Set cpu DAI configuration */
+	ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set cpu DAI configuration\n");
+		return ret;
+	}
+
+	/* Set the codec system clock for DAC and ADC */
+	ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
+				     SND_SOC_CLOCK_IN);
+	if (ret < 0) {
+		printk(KERN_ERR "can't set codec system clock\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+static struct snd_soc_ops omap3touchbook_ops = {
+	.hw_params = omap3touchbook_hw_params,
+};
+
+/* Digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link omap3touchbook_dai = {
+	.name = "TWL4030",
+	.stream_name = "TWL4030",
+	.cpu_dai = &omap_mcbsp_dai[0],
+	.codec_dai = &twl4030_dai[TWL4030_DAI_HIFI],
+	.ops = &omap3touchbook_ops,
+};
+
+/* Audio machine driver */
+static struct snd_soc_card snd_soc_omap3touchbook = {
+	.name = "omap3touchbook",
+	.platform = &omap_soc_platform,
+	.dai_link = &omap3touchbook_dai,
+	.num_links = 1,
+};
+
+/* Audio subsystem */
+static struct snd_soc_device omap3touchbook_snd_devdata = {
+	.card = &snd_soc_omap3touchbook,
+	.codec_dev = &soc_codec_dev_twl4030,
+};
+
+static struct platform_device *omap3touchbook_snd_device;
+
+static void jack_work_func(struct work_struct *wq)
+{
+	struct snd_soc_device *socdev = platform_get_drvdata(
+						omap3touchbook_snd_device);
+	struct snd_soc_codec *codec = socdev->card->codec;
+
+	snd_soc_dapm_sync(codec);
+}
+DECLARE_WORK(jack_work, jack_work_func);
+
+static irqreturn_t touchbook_headphone_event(int irq, void *snd)
+{
+	int status = gpio_get_value(TB_HEADPHONE_GPIO);
+	struct snd_soc_device *socdev = platform_get_drvdata(
+						omap3touchbook_snd_device);
+	struct snd_soc_codec *codec = socdev->card->codec;
+
+	if (status) {
+		snd_soc_dapm_disable_pin(codec, "HFL");
+		snd_soc_dapm_disable_pin(codec, "HFR");
+	} else {
+		snd_soc_dapm_enable_pin(codec, "HFL");
+		snd_soc_dapm_enable_pin(codec, "HFR");
+	}
+
+	schedule_work(&jack_work);
+	return IRQ_HANDLED;
+}
+
+static int __init omap3touchbook_soc_init(void)
+{
+	int ret;
+
+	if (!machine_is_touchbook()) {
+		pr_debug("Not OMAP3 Touch Book!\n");
+		return -ENODEV;
+	}
+	pr_info("OMAP3 Touch Book SoC init\n");
+
+	omap3touchbook_snd_device = platform_device_alloc("soc-audio", -1);
+	if (!omap3touchbook_snd_device) {
+		printk(KERN_ERR "Platform device allocation failed\n");
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(omap3touchbook_snd_device,
+				&omap3touchbook_snd_devdata);
+	omap3touchbook_snd_devdata.dev = &omap3touchbook_snd_device->dev;
+	*(unsigned int *)omap3touchbook_dai.cpu_dai->private_data = 1;
+
+	/* Touch Book -- headphone jack sensor */
+	omap_set_gpio_debounce(TB_HEADPHONE_GPIO, 1);
+	omap_set_gpio_debounce_time(TB_HEADPHONE_GPIO, 0xff);
+
+	ret = request_irq(TB_HEADPHONE_IRQ, touchbook_headphone_event,
+				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				"touchbook_headphone",
+				omap3touchbook_snd_device);
+	if (ret < 0)
+		goto err1;
+
+	ret = platform_device_add(omap3touchbook_snd_device);
+	if (ret)
+		goto err1;
+
+	/* Detect headphone status */
+	touchbook_headphone_event(0, omap3touchbook_snd_device);
+
+	return 0;
+
+err1:
+	printk(KERN_ERR "Unable to add platform device\n");
+	platform_device_put(omap3touchbook_snd_device);
+
+	return ret;
+}
+
+static void __exit omap3touchbook_soc_exit(void)
+{
+	platform_device_unregister(omap3touchbook_snd_device);
+}
+
+module_init(omap3touchbook_soc_init);
+module_exit(omap3touchbook_soc_exit);
+
+MODULE_AUTHOR("Gregoire Gentil <gregoire@gentil.com>");
+MODULE_DESCRIPTION("ALSA SoC OMAP3 Touch Book");
+MODULE_LICENSE("GPL");
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 7/8] Video driver of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18           ` [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book Gregoire Gentil
@ 2009-11-19 17:18             ` Gregoire Gentil
  2009-11-19 17:18               ` [PATCH 8/8] Additional file for " Gregoire Gentil
  2009-11-20  4:07               ` [PATCH 7/8] Video driver of " Hiremath, Vaibhav
  2009-11-23 15:35             ` [alsa-devel] [PATCH 6/8] Audio " Mark Brown
  1 sibling, 2 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 drivers/video/omap/lcd_omap3touchbook.c |  130 +++++++++++++++++++++++++++++++
 1 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap/lcd_omap3touchbook.c

diff --git a/drivers/video/omap/lcd_omap3touchbook.c b/drivers/video/omap/lcd_omap3touchbook.c
new file mode 100644
index 0000000..5b58703
--- /dev/null
+++ b/drivers/video/omap/lcd_omap3touchbook.c
@@ -0,0 +1,130 @@
+/*
+ * LCD panel support for the Touch Book
+ *
+ * Author: Gregoire Gentil <gregoire@gentil.com>
+ *
+ * Derived from drivers/video/omap/lcd-omap3beagle.c
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * 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.,
+ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/i2c/twl4030.h>
+
+#include <plat/mux.h>
+#include <plat/omapfb.h>
+#include <asm/mach-types.h>
+
+#define LCD_PANEL_ENABLE_GPIO       176
+
+static int omap3beagle_panel_init(struct lcd_panel *panel,
+				struct omapfb_device *fbdev)
+{
+	gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable");
+	return 0;
+}
+
+static void omap3beagle_panel_cleanup(struct lcd_panel *panel)
+{
+	gpio_free(LCD_PANEL_ENABLE_GPIO);
+}
+
+static int omap3beagle_panel_enable(struct lcd_panel *panel)
+{
+	gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
+	return 0;
+}
+
+static void omap3beagle_panel_disable(struct lcd_panel *panel)
+{
+	gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
+}
+
+static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel)
+{
+	return 0;
+}
+
+struct lcd_panel omap3beagle_panel = {
+	.name		= "omap3beagle",
+	.config		= OMAP_LCDC_PANEL_TFT,
+
+	.bpp		= 16,
+	.data_lines	= 24,
+	.x_res		= 1024,
+	.y_res		= 600,
+	.hsw		= 3,
+	.hfp		= 3,
+	.hbp		= 39,
+	.vsw		= 1,
+	.vfp		= 2,
+	.vbp		= 7,
+
+	.pixel_clock	= 64000,
+
+	.init		= omap3touchbook_panel_init,
+	.cleanup	= omap3touchbook_panel_cleanup,
+	.enable		= omap3touchbook_panel_enable,
+	.disable	= omap3touchbook_panel_disable,
+	.get_caps	= omap3touchbook_panel_get_caps,
+};
+
+static int omap3touchbook_panel_probe(struct platform_device *pdev)
+{
+	omapfb_register_panel(&omap3beagle_panel);
+	return 0;
+}
+
+static int omap3touchbook_panel_remove(struct platform_device *pdev)
+{
+	return 0;
+}
+
+static int omap3touchbook_panel_suspend(struct platform_device *pdev,
+				   pm_message_t mesg)
+{
+	return 0;
+}
+
+static int omap3touchbook_panel_resume(struct platform_device *pdev)
+{
+	return 0;
+}
+
+struct platform_driver omap3touchbook_panel_driver = {
+	.probe		= omap3touchbook_panel_probe,
+	.remove		= omap3touchbook_panel_remove,
+	.suspend	= omap3touchbook_panel_suspend,
+	.resume		= omap3touchbook_panel_resume,
+	.driver		= {
+		.name	= "omap3touchbook_lcd",
+		.owner	= THIS_MODULE,
+	},
+};
+
+static int __init omap3touchbook_panel_drv_init(void)
+{
+	return platform_driver_register(&omap3beagle_panel_driver);
+}
+
+static void __exit omap3touchbook_panel_drv_exit(void)
+{
+	platform_driver_unregister(&omap3touchbook_panel_driver);
+}
+
+module_init(omap3touchbook_panel_drv_init);
+module_exit(omap3touchbook_panel_drv_exit);
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 8/8] Additional file for Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18             ` [PATCH 7/8] Video " Gregoire Gentil
@ 2009-11-19 17:18               ` Gregoire Gentil
  2009-11-20  4:07               ` [PATCH 7/8] Video driver of " Hiremath, Vaibhav
  1 sibling, 0 replies; 18+ messages in thread
From: Gregoire Gentil @ 2009-11-19 17:18 UTC (permalink / raw)
  To: linux-omap; +Cc: Gregoire Gentil, Tony Lindgren, Tim Yamin


Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
---
 arch/arm/mach-omap2/Kconfig  |    5 +++++
 arch/arm/mach-omap2/Makefile |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 034d990..6d32d1b 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -73,6 +73,11 @@ config MACH_OMAP3_PANDORA
 	bool "OMAP3 Pandora"
 	depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP3_TOUCHBOOK
+	bool "OMAP3 Touch Book"
+	depends on ARCH_OMAP3 && ARCH_OMAP34XX
+	select BACKLIGHT_CLASS_DEVICE
+
 config MACH_OMAP_3430SDP
 	bool "OMAP 3430 SDP board"
 	depends on ARCH_OMAP3 && ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 59b0ccc..b6b5c7f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -90,6 +90,8 @@ obj-$(CONFIG_MACH_CM_T35)		+= board-cm-t35.o \
 					   mmc-twl4030.o
 obj-$(CONFIG_MACH_IGEP0020)		+= board-igep0020.o \
 					   mmc-twl4030.o
+obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
+					   mmc-twl4030.o
 
 obj-$(CONFIG_MACH_OMAP_4430SDP)		+= board-4430sdp.o
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 5/8] HID file for Always Innovating OMAP3-based Touch Book keyboard
  2009-11-19 17:18         ` [PATCH 5/8] HID file " Gregoire Gentil
  2009-11-19 17:18           ` [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book Gregoire Gentil
@ 2009-11-19 17:37           ` Koen Kooi
  1 sibling, 0 replies; 18+ messages in thread
From: Koen Kooi @ 2009-11-19 17:37 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org List

You haven't addressed Dmitry's comments in this new version

regards,

Koen

Op 19 nov 2009, om 18:18 heeft Gregoire Gentil het volgende geschreven:

>
> Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
> ---
> drivers/hid/hid-alwaysinnovating.c |  262 +++++++++++++++++++++++++++ 
> +++++++++
> 1 files changed, 262 insertions(+), 0 deletions(-)
> create mode 100644 drivers/hid/hid-alwaysinnovating.c
>
> diff --git a/drivers/hid/hid-alwaysinnovating.c b/drivers/hid/hid- 
> alwaysinnovating.c
> new file mode 100644
> index 0000000..a7bb0fd
> --- /dev/null
> +++ b/drivers/hid/hid-alwaysinnovating.c
> @@ -0,0 +1,262 @@
> +/*
> + *  USB HID quirks support for the Always Innovating Touch Book
> + *  Code borrowed from hid-apple.c
> + *
> + *  Copyright (c) 2009 Gregoire Gentil <gregoire@gentil.com>
> + *  Copyright (c) 2009 Tim Yamin <plasm@roo.me.uk>
> + */
> +
> +/*
> + * This program is free software; you can redistribute it and/or  
> modify it
> + * under the terms of the GNU General Public License as published  
> by the Free
> + * Software Foundation; either version 2 of the License, or (at  
> your option)
> + * any later version.
> + */
> +
> +#include <linux/device.h>
> +#include <linux/hid.h>
> +#include <linux/module.h>
> +#include <linux/usb.h>
> +
> +#include "hid-ids.h"
> +
> +struct touchbook_sc {
> +	unsigned long quirks;
> +	unsigned int  fn_on;
> +	DECLARE_BITMAP(pressed_fn, KEY_CNT);
> +};
> +
> +struct touchbook_key_translation {
> +	u16 from;
> +	u16 to;
> +	u8 flags;
> +};
> +
> +static struct touchbook_key_translation touchbook_fn_keys[] = {
> +	{ KEY_F6,	KEY_BRIGHTNESSDOWN },
> +	{ KEY_F7,	KEY_BRIGHTNESSUP },
> +
> +	{ KEY_F8,	KEY_MUTE },
> +	{ KEY_F9,	KEY_VOLUMEDOWN },
> +	{ KEY_F10,	KEY_VOLUMEUP },
> +
> +	{ KEY_UP,	KEY_PAGEUP },
> +	{ KEY_DOWN,	KEY_PAGEDOWN },
> +	{ }
> +};
> +
> +extern unsigned long touchbook_revision;
> +unsigned long swap_key;
> +
> +static struct touchbook_key_translation *touchbook_find_translation(
> +		struct touchbook_key_translation *table, u16 from)
> +{
> +	struct touchbook_key_translation *trans;
> +
> +	/* Look for the translation */
> +	for (trans = table; trans->from; trans++)
> +		if (trans->from == from)
> +			return trans;
> +
> +	return NULL;
> +}
> +
> +static int touchbook_event(struct hid_device *hid, struct hid_field  
> *field,
> +		struct hid_usage *usage, __s32 value)
> +{
> +	int do_translate;
> +
> +	struct input_dev *input = field->hidinput->input;
> +	struct touchbook_sc *asc = hid_get_drvdata(hid);
> +	struct touchbook_key_translation *trans;
> +
> +	if (swap_key && usage->code == KEY_RIGHTSHIFT) {
> +		input_event(input, usage->type, KEY_END, value);
> +		return 1;
> +	}
> +
> +	if (swap_key && usage->code == KEY_END) {
> +		input_event(input, usage->type, KEY_RIGHTSHIFT, value);
> +		return 1;
> +	}
> +
> +	if (usage->code == KEY_POWER) {
> +		asc->fn_on = !!value;
> +		input_event(input, usage->type, usage->code, value);
> +		return 1;
> +	}
> +
> +	trans = touchbook_find_translation(touchbook_fn_keys, usage->code);
> +	if (trans) {
> +		if (test_bit(usage->code, asc->pressed_fn))
> +			do_translate = 1;
> +		else
> +			do_translate = asc->fn_on;
> +
> +		if (do_translate) {
> +			if (value)
> +				set_bit(usage->code, asc->pressed_fn);
> +			else
> +				clear_bit(usage->code, asc->pressed_fn);
> +
> +			input_event(input, usage->type, trans->to,
> +					value);
> +
> +			return 1;
> +		}
> +	}
> +
> +	return 0;
> +}
> +
> +static int touchbook_input_mapping(struct hid_device *hdev,
> +		struct hid_input *hi,
> +		struct hid_field *field, struct hid_usage *usage,
> +		unsigned long **bit, int *max)
> +{
> +	struct touchbook_key_translation *trans;
> +
> +	/* Enable all other keys */
> +	for (trans = touchbook_fn_keys; trans->from; trans++)
> +		set_bit(trans->to, hi->input->keybit);
> +
> +	return 0;
> +}
> +
> +static ssize_t show_swap_key(struct device *dev,
> +		struct device_attribute *attr, char *buf)
> +{
> +	return snprintf(buf, PAGE_SIZE, "%lu\n", swap_key);
> +}
> +
> +static ssize_t store_swap_key(struct device *dev,
> +		struct device_attribute *attr,
> +		const char *buf, size_t count)
> +{
> +	 strict_strtoul(buf, 10, &swap_key);
> +
> +	if (swap_key != 0 && swap_key != 1) {
> +		swap_key = 0;
> +		return -EINVAL;
> +	}
> +
> +	return count;
> +}
> +
> +static struct device_attribute touchbook_hid_attrs[] = {
> +	__ATTR(swap_key, S_IRUGO | S_IWUGO, show_swap_key, store_swap_key),
> +};
> +
> +int touchbook_create_sysfs(struct hid_device *hdev)
> +{
> +	int i;
> +	int r;
> +
> +	for (i = 0; i < ARRAY_SIZE(touchbook_hid_attrs); i++) {
> +		r = device_create_file(&hdev->dev,
> +				&touchbook_hid_attrs[i]);
> +
> +		if (r) {
> +			dev_err(&hdev->dev, "failed to create sysfs file\n");
> +			return r;
> +		}
> +	}
> +
> +	return 0;
> +}
> +
> +void touchbook_remove_sysfs(struct hid_device *hdev)
> +{
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(touchbook_hid_attrs); i++)
> +		device_remove_file(&hdev->dev,
> +					&touchbook_hid_attrs[i]);
> +}
> +
> +static int touchbook_probe(struct hid_device *hdev,
> +		const struct hid_device_id *id)
> +{
> +	unsigned long quirks = id->driver_data;
> +	struct touchbook_sc *asc;
> +	unsigned int connect_mask = HID_CONNECT_DEFAULT;
> +	int ret;
> +
> +	asc = kzalloc(sizeof(*asc), GFP_KERNEL);
> +	if (asc == NULL) {
> +		dev_err(&hdev->dev, "can't alloc touchbook descriptor\n");
> +		return -ENOMEM;
> +	}
> +
> +	asc->quirks = quirks;
> +	hid_set_drvdata(hdev, asc);
> +
> +	ret = hid_parse(hdev);
> +	if (ret) {
> +		dev_err(&hdev->dev, "parse failed\n");
> +		goto err_free;
> +	}
> +
> +	ret = touchbook_create_sysfs(hdev);
> +	if (ret) {
> +		dev_err(&hdev->dev, "failed to create sysfs entries\n");
> +		goto err_free;
> +	}
> +
> +	swap_key = (touchbook_revision >= 4) ? 1 : 0;
> +
> +	ret = hid_hw_start(hdev, connect_mask);
> +	if (ret) {
> +		dev_err(&hdev->dev, "hw start failed\n");
> +		goto err_free;
> +	}
> +
> +	return 0;
> +err_free:
> +	kfree(asc);
> +	return ret;
> +}
> +
> +static void touchbook_remove(struct hid_device *hdev)
> +{
> +	hid_hw_stop(hdev);
> +	kfree(hid_get_drvdata(hdev));
> +	touchbook_remove_sysfs(hdev);
> +}
> +
> +static const struct hid_device_id touchbook_devices[] = {
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_ALWAYSINNOVATING,
> +		USB_DEVICE_ID_ALWAYSINNOVATING_TOUCH_BOOK) },
> +	{ }
> +};
> +
> +MODULE_DEVICE_TABLE(hid, touchbook_devices);
> +
> +static struct hid_driver touchbook_driver = {
> +	.name = "touchbook",
> +	.id_table = touchbook_devices,
> +	.probe = touchbook_probe,
> +	.remove = touchbook_remove,
> +	.event = touchbook_event,
> +	.input_mapping = touchbook_input_mapping,
> +};
> +
> +static int touchbook_init(void)
> +{
> +	int ret;
> +
> +	ret = hid_register_driver(&touchbook_driver);
> +	if (ret)
> +		printk(KERN_ERR "can't register touchbook driver\n");
> +
> +	return ret;
> +}
> +
> +static void touchbook_exit(void)
> +{
> +	hid_unregister_driver(&touchbook_driver);
> +}
> +
> +module_init(touchbook_init);
> +module_exit(touchbook_exit);
> +MODULE_LICENSE("GPL");
> -- 
> 1.6.0.4
>
> --
> 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
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/8] Freescale MMA7455 accelerometer driver
  2009-11-19 17:18     ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Gregoire Gentil
  2009-11-19 17:18       ` [PATCH 4/8] Driver for Always Innovating OMAP3-based Touch Book keyboard Gregoire Gentil
@ 2009-11-19 19:24       ` Jonathan Cameron
  1 sibling, 0 replies; 18+ messages in thread
From: Jonathan Cameron @ 2009-11-19 19:24 UTC (permalink / raw)
  To: Gregoire Gentil; +Cc: linux-omap, Tony Lindgren, Tim Yamin, linux-input

Hi Gregoire,

Couple of minor style type comments you are welcome to ignore

Bigger ones are that I don't understand your signed 10 bit conversion
functions and the bits of the probe function that don't seem to have been
written (error handling etc).

Jonathan

Gregoire Gentil wrote:
> Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
> ---
>  drivers/input/misc/Kconfig    |    9 +
>  drivers/input/misc/Makefile   |    2 +-
>  drivers/input/misc/mma7455l.c |  626 +++++++++++++++++++++++++++++++++++++++++
>  include/linux/mma7455l.h      |   11 +
>  4 files changed, 647 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/input/misc/mma7455l.c
>  create mode 100644 include/linux/mma7455l.h
> 
> diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
> index a9bb254..454bac7 100644
> --- a/drivers/input/misc/Kconfig
> +++ b/drivers/input/misc/Kconfig
> @@ -317,4 +317,13 @@ config INPUT_PCAP
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called pcap_keys.
>  
> +config INPUT_MMA7455L
> +	tristate "Freescale MMA7455L 3-axis accelerometer"
> +	depends on SPI_MASTER
> +	help
> +	  SPI driver for the Freescale MMA7455L 3-axis accelerometer.
> +
> +	  The userspace interface is a 3-axis (X/Y/Z) relative movement
> +	  Linux input device, reporting REL_[XYZ] events.
> +
>  endif
> diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
> index a8b8485..3db6347 100644
> --- a/drivers/input/misc/Makefile
> +++ b/drivers/input/misc/Makefile
> @@ -30,4 +30,4 @@ obj-$(CONFIG_INPUT_WINBOND_CIR)		+= winbond-cir.o
>  obj-$(CONFIG_INPUT_WISTRON_BTNS)	+= wistron_btns.o
>  obj-$(CONFIG_INPUT_WM831X_ON)		+= wm831x-on.o
>  obj-$(CONFIG_INPUT_YEALINK)		+= yealink.o
> -
> +obj-$(CONFIG_INPUT_MMA7455L)		+= mma7455l.o
> diff --git a/drivers/input/misc/mma7455l.c b/drivers/input/misc/mma7455l.c
> new file mode 100644
> index 0000000..d415bb0
> --- /dev/null
> +++ b/drivers/input/misc/mma7455l.c
> @@ -0,0 +1,626 @@
> +/* Linux kernel driver for the Freescale MMA7455L 3-axis accelerometer
> + *
> + * Copyright (C) 2009 by Always Innovating, Inc.
> + * Author: Gregoire Gentil <gregoire@gentil.com>
> + * Author: Tim Yamin <plasm@roo.me.uk>
> + * All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + *
> + */
> +
> +/*
> + * What this driver doesn't yet support:
> + *
> + * - I2C
> + * - INT2 handling
> + * - Pulse detection (and the sysctls to control it)
> + * - 10-bit measurement
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/types.h>
> +#include <linux/module.h>
> +#include <linux/device.h>
> +#include <linux/platform_device.h>
> +#include <linux/delay.h>
> +#include <linux/input.h>
> +#include <linux/irq.h>
> +#include <linux/interrupt.h>
> +#include <linux/sysfs.h>
> +#include <linux/gpio.h>
> +
> +#include <linux/mma7455l.h>
> +#include <linux/spi/spi.h>
> +
> +#define MMA7455L_WHOAMI_MAGIC		0x55
> +
> +enum mma7455l_reg {
> +	MMA7455L_REG_XOUTL		= 0x00,
> +	MMA7455L_REG_XOUTH		= 0x01,
> +	MMA7455L_REG_YOUTL		= 0x02,
> +	MMA7455L_REG_YOUTH		= 0x03,
> +	MMA7455L_REG_ZOUTL 		= 0x04,
> +	MMA7455L_REG_ZOUTH		= 0x05,
> +	MMA7455L_REG_XOUT8		= 0x06,
> +	MMA7455L_REG_YOUT8		= 0x07,
> +	MMA7455L_REG_ZOUT8		= 0x08,
> +	MMA7455L_REG_STATUS		= 0x09,
> +	MMA7455L_REG_DETSRC		= 0x0a,
> +	MMA7455L_REG_TOUT		= 0x0b,
> +	MMA7455L_REG_RESERVED1		= 0x0c,
> +	MMA7455L_REG_I2CAD		= 0x0d,
> +	MMA7455L_REG_USRINF		= 0x0e,
> +	MMA7455L_REG_WHOAMI		= 0x0f,
> +	MMA7455L_REG_XOFFL		= 0x10,
> +	MMA7455L_REG_XOFFH		= 0x11,
> +	MMA7455L_REG_YOFFL		= 0x12,
> +	MMA7455L_REG_YOFFH		= 0x13,
> +	MMA7455L_REG_ZOFFL		= 0x14,
> +	MMA7455L_REG_ZOFFH		= 0x15,
> +	MMA7455L_REG_MCTL		= 0x16,
> +	MMA7455L_REG_INTRST		= 0x17,
> +	MMA7455L_REG_CTL1		= 0x18,
> +	MMA7455L_REG_CTL2		= 0x19,
> +	MMA7455L_REG_LDTH		= 0x1a,
> +	MMA7455L_REG_PDTH		= 0x1b,
> +	MMA7455L_REG_PW			= 0x1c,
> +	MMA7455L_REG_LT			= 0x1d,
> +	MMA7455L_REG_TW			= 0x1e,
> +	MMA7455L_REG_RESERVED2		= 0x1f,
> +};
> +
> +enum mma7455l_reg_status {
> +	MMA7455L_STATUS_XDA		= 0x08,
> +	MMA7455L_STATUS_YDA		= 0x10,
> +	MMA7455L_STATUS_ZDA		= 0x20,
> +};
> +
> +enum mma7455l_mode {
> +	MMA7455L_MODE_STANDBY		= 0,
> +	MMA7455L_MODE_MEASUREMENT	= 1,
> +	MMA7455L_MODE_LEVELDETECTION	= 0x42, /* Set DRPD to on */
> +	MMA7455L_MODE_PULSEDETECTION	= 0x43, /* Set DRPD to on */
> +	MMA7455L_MODE_MASK		= 0x43,
> +};
> +
> +enum mma7455l_gselect {
> +	MMA7455L_GSELECT_8		= 0x0,
> +	MMA7455L_GSELECT_2		= 0x4,
> +	MMA7455L_GSELECT_4		= 0x8,
> +	MMA7455L_GSELECT_MASK		= 0xC,
> +};
> +
> +/* FIXME */
> +#define MMA7455L_F_FS			0x0020 	/* ADC full scale */
> +
> +
> +struct mma7455l_info {
> +	struct spi_device *spi_dev;
> +	struct input_dev *input_dev;
> +	struct mutex lock;		/* Struct mutex lock */
> +	struct delayed_work work;
> +
> +	u8 mode;
> +	u8 gSelect;
> +
> +	u8 flags;
> +	u8 working;
> +};
> +
> +/* lowlevel register access functions */
> +
> +#define WRITE_BIT	(1 << 7)
> +#define ADDR_SHIFT	1
> +
> +static inline u_int8_t __reg_read(struct mma7455l_info *mma, u_int8_t reg)
> +{
> +	int rc;
> +	u_int8_t cmd;
> +
> +	cmd = ((reg & 0x3f) << ADDR_SHIFT);
Might as well loose the rc and roll next two lines into one. Might as well roll the
cmd variable in as well seeing as it's relatively straight forward.
Mind you if you think it is clearer this way, feel free to leave it alone.
> +	rc = spi_w8r8(mma->spi_dev, cmd);
> +
> +	return rc;
> +}
> +
> +static u_int8_t reg_read(struct mma7455l_info *mma, u_int8_t reg)
> +{
> +	u_int8_t ret;
> +
> +	mutex_lock(&mma->lock);
> +	ret = __reg_read(mma, reg);
> +	mutex_unlock(&mma->lock);
> +
> +	return ret;
> +}
> +
> +static s16 __reg_read_10(struct mma7455l_info *mma, u8 reg1, u8 reg2)
> +{
> +	u8 v1, v2;
> +
> +	v1 = __reg_read(mma, reg1);
> +	v2 = __reg_read(mma, reg2);
> +
Not sure I follow this.  Are we dealing with an architecture
where we aren't using 2's complement for signed integers? 
If not you'll need
to sign extend rather than what looks to be happening here, where you are
simply moving the sign bit to the 16th lsb.  If you are doing this for
some other reason, please clarify with a comment.
> +	return (v2 & 0x4) << 13 | (v2 & 0x3) << 8 | v1;
> +}
> +
> +static inline int __reg_write(struct mma7455l_info *mma,
> +				u_int8_t reg, u_int8_t val)
> +{
> +	u_int8_t buf[2];
> +
> +	buf[0] = ((reg & 0x3f) << ADDR_SHIFT) | WRITE_BIT;
> +	buf[1] = val;
Could roll these two into an array initialization.
> +
> +	return spi_write(mma->spi_dev, buf, sizeof(buf));
> +}
> +
> +static int reg_write(struct mma7455l_info *mma, u_int8_t reg, u_int8_t val)
> +{
> +	int ret;
> +
> +	mutex_lock(&mma->lock);
> +	ret = __reg_write(mma, reg, val);
> +	mutex_unlock(&mma->lock);
> +
> +	return ret;
> +}
> +
> +static s16 __reg_write_10(struct mma7455l_info *mma,
> +				u8 reg1, u8 reg2, s16 value)
> +{
> +	int ret;
> +	u8 v1, v2;
> +
> +	v1 = value & 0xFF;
This is somewhat odd as well. 
> +	if (value < 0)
> +		v2 = ((value >> 8) & 0x3) | 0x4;
> +	else
> +		v2 = 0;
> +
> +	ret = __reg_write(mma, reg1, v1);
> +	ret = __reg_write(mma, reg2, v2);
> +	return ret;
> +}
> +
> +static void mma7455l_work(struct work_struct *work)
> +{
> +	struct mma7455l_info *mma =
> +			container_of(work, struct mma7455l_info, work.work);
unconventional spacing here.  Should be a newline after parameter declarations
rather than here.
> +
> +	s8 val;
> +	mma->working = 1;
> +
> +	/* FIXME: 10 bit accuracy? */
> +	if (!(mma->flags & MMA7455L_STATUS_XDA)) {
> +		val = reg_read(mma, MMA7455L_REG_XOUT8);
> +		input_report_abs(mma->input_dev, ABS_X, val);
> +	}
> +	if (!(mma->flags & MMA7455L_STATUS_YDA)) {
> +		val = reg_read(mma, MMA7455L_REG_YOUT8);
> +		input_report_abs(mma->input_dev, ABS_Y, val);
> +	}
> +	if (!(mma->flags & MMA7455L_STATUS_ZDA)) {
> +		val = reg_read(mma, MMA7455L_REG_ZOUT8);
> +		input_report_abs(mma->input_dev, ABS_Z, val);
> +	}
> +
> +	mma->working = 0;
> +	input_sync(mma->input_dev);
> +	put_device(&mma->spi_dev->dev);
> +
> +	/* Enable IRQ and clear out interrupt */
> +	reg_write(mma, MMA7455L_REG_INTRST, 0x3);
> +	reg_write(mma, MMA7455L_REG_INTRST, 0x0);
> +	enable_irq(mma->spi_dev->irq);
> +}

Why status given you do nothing with it? 
> +static void mma7455l_schedule_work(struct mma7455l_info *mma)
> +{
> +	int status;
> +
> +	get_device(&mma->spi_dev->dev);
> +	status = schedule_delayed_work(&mma->work, HZ / 10);
> +}
> +
> +static irqreturn_t mma7455l_interrupt(int irq, void *_mma)
> +{
> +	struct mma7455l_info *mma = _mma;
> +	mma7455l_schedule_work(mma);
> +
> +	/* Disable any further interrupts until we have processed
> +	 * the current one */
> +	disable_irq(mma->spi_dev->irq);
> +	return IRQ_HANDLED;
> +}
> +
> +/* sysfs */
> +
> +static void get_mode(struct mma7455l_info *mma, u8 *mode, u8 *gSelect)
> +{
> +	u8 tmp = reg_read(mma, MMA7455L_REG_MCTL);
> +
> +	*mode = tmp & MMA7455L_MODE_MASK;
> +	*gSelect = tmp & MMA7455L_GSELECT_MASK;
> +}
> +
> +static void set_mode(struct mma7455l_info *mma, u8 mode, u8 gSelect)
> +{
> +	reg_write(mma, MMA7455L_REG_MCTL, mode | gSelect);
> +}
> +
> +static void update_mode(struct mma7455l_info *mma, u8 mode, u8 gSelect)
> +{
> +	mma->mode = mode;
> +	mma->gSelect = gSelect;
> +
> +	reg_write(mma, MMA7455L_REG_MCTL, mma->mode | mma->gSelect);
> +}
> +
> +static ssize_t show_measure(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +	s8 x, y, z;
> +	u8 old_Mode, old_gSelect;
> +
> +	get_mode(mma, &old_Mode, &old_gSelect);
> +	set_mode(mma, MMA7455L_MODE_MEASUREMENT, MMA7455L_GSELECT_2);
> +
This would probably benefit from an explanatory comment.
> +	while (reg_read(mma, MMA7455L_REG_STATUS) == 0)
> +		msleep(10);
> +
> +	x = reg_read(mma, MMA7455L_REG_XOUT8);
> +	y = reg_read(mma, MMA7455L_REG_YOUT8);
> +	z = reg_read(mma, MMA7455L_REG_ZOUT8);
> +
> +	set_mode(mma, old_Mode, old_gSelect);
> +	return sprintf(buf, "%d %d %d\n", x, y, z);
> +}
> +
> +static ssize_t show_mode(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	switch (mma->mode) {
> +	case MMA7455L_MODE_STANDBY:
> +		return sprintf(buf, "Standby\n");
> +		break;
> +	case MMA7455L_MODE_MEASUREMENT:
> +		return sprintf(buf, "Measurement\n");
> +		break;
> +	case MMA7455L_MODE_LEVELDETECTION:
> +		return sprintf(buf, "Level Detection\n");
> +		break;
> +	case MMA7455L_MODE_PULSEDETECTION:
> +		return sprintf(buf, "Pulse Detection\n");
> +		break;
> +	}
> +
Is this possible?  If not I'd go for returning suitable error code rather
than printing.
> +	return sprintf(buf, "Unknown mode!\n");
> +}
> +
> +static ssize_t show_gSelect(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	switch (mma->gSelect) {
> +	case MMA7455L_GSELECT_8:
> +		return sprintf(buf, "8\n");
> +		break;
> +	case MMA7455L_GSELECT_4:
> +		return sprintf(buf, "4\n");
> +		break;
> +	case MMA7455L_GSELECT_2:
> +		return sprintf(buf, "2\n");
> +		break;
> +	}
> +
Likewise here.  Not useful in a sense to say we don't know what it is.
> +	return sprintf(buf, "Unknown gSelect!\n");
> +}
> +
> +static ssize_t show_level_threshold(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +	return sprintf(buf, "%u\n", reg_read(mma, MMA7455L_REG_LDTH));
> +}
> +
> +static ssize_t show_calibration(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	s16 x, y, z;
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	mutex_lock(&mma->lock);
> +	x = __reg_read_10(mma, MMA7455L_REG_XOFFL, MMA7455L_REG_XOFFH);
> +	y = __reg_read_10(mma, MMA7455L_REG_YOFFL, MMA7455L_REG_YOFFH);
> +	z = __reg_read_10(mma, MMA7455L_REG_ZOFFL, MMA7455L_REG_ZOFFH);
> +	mutex_unlock(&mma->lock);
> +
> +	return sprintf(buf, "%d %d %d\n", x, y, z);
> +}

Are there any more standardized terms for these?  Not sure having sysfs interface
where you have to write such long names is ideal...
> +static ssize_t write_mode(struct device *dev,
> +		struct device_attribute *attr, const char *buf, size_t count)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	if (!strncmp(buf, "Standby", count))
> +		update_mode(mma, MMA7455L_MODE_STANDBY, mma->gSelect);
> +	else if (!strncmp(buf, "Measurement", count))
> +		update_mode(mma, MMA7455L_MODE_MEASUREMENT, mma->gSelect);
> +	else if (!strncmp(buf, "Level Detection", count))
> +		update_mode(mma, MMA7455L_MODE_LEVELDETECTION, mma->gSelect);
> +	else if (!strncmp(buf, "Pulse Detection", count))
> +		update_mode(mma, MMA7455L_MODE_PULSEDETECTION, mma->gSelect);
> +
> +	return count;
> +}
> +
> +static ssize_t write_gSelect(struct device *dev,
> +		struct device_attribute *attr, const char *buf, size_t count)
> +{
> +	unsigned long v;
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
Worth rounding to nearest rather than only accepting a subset that the userspace
program might not know about? Either that or publishing via sysfs what values
are valid?  Or at absolute minimum documenting this in the api docs.
> +	if (strict_strtoul(buf, 10, &v) == 0) {
> +		switch (v) {
> +		case 8:
> +			update_mode(mma, mma->mode, MMA7455L_GSELECT_8);
> +			break;
> +		case 4:
> +			update_mode(mma, mma->mode, MMA7455L_GSELECT_4);
> +			break;
> +		case 2:
> +			update_mode(mma, mma->mode, MMA7455L_GSELECT_2);
> +			break;
> +		default:
> +			return -EINVAL;
> +			break;
> +		}
> +		return count;
> +	}
> +
> +	return -EINVAL;
> +}
> +
> +static ssize_t write_level_threshold(struct device *dev,
> +		struct device_attribute *attr, const char *buf, size_t count)
> +{
> +	unsigned long v;
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	if (strict_strtoul(buf, 10, &v) == 0) {
> +		if (v <= 0xFF) {
> +			reg_write(mma, MMA7455L_REG_LDTH, v);
> +			return count;

Else is pointless as dropping through will return same error. Hence
you might as well make this function

unsigned long v;
struct mma7455l_info *mma = dev_get_drvdata(dev);
if ((struct_strtoul(buf, 10, &v) == 0) && (v <= 0xFF))
	return count;
return -EINVAL; 
> +		} else
> +			return -EINVAL;
> +	}
> +
> +	return -EINVAL;
> +}
> +
> +static ssize_t write_calibration(struct device *dev,
> +		struct device_attribute *attr, const char *buf, size_t count)
> +{
> +	int x, y, z;
> +	struct mma7455l_info *mma = dev_get_drvdata(dev);
> +
> +	if (sscanf(buf, "%d %d %d", &x, &y, &z) == 3) {
> +		mutex_lock(&mma->lock);
> +		__reg_write_10(mma, MMA7455L_REG_XOFFL, MMA7455L_REG_XOFFH, x);
> +		__reg_write_10(mma, MMA7455L_REG_YOFFL, MMA7455L_REG_YOFFH, y);
> +		__reg_write_10(mma, MMA7455L_REG_ZOFFL, MMA7455L_REG_ZOFFH, z);
> +		mutex_unlock(&mma->lock);
> +
> +		return count;
> +	}
> +
> +	return -EINVAL;
> +}
> +
> +static DEVICE_ATTR(measure, S_IRUGO, show_measure, NULL);
> +static DEVICE_ATTR(mode, S_IRUGO | S_IWUGO, show_mode, write_mode);
> +static DEVICE_ATTR(gSelect, S_IRUGO | S_IWUGO, show_gSelect, write_gSelect);
> +static DEVICE_ATTR(level_threshold, S_IRUGO | S_IWUGO, show_level_threshold,
> +			write_level_threshold);
> +static DEVICE_ATTR(calibration, S_IRUGO | S_IWUGO, show_calibration,
> +			write_calibration);
> +
> +static struct attribute *mma7455l_sysfs_entries[] = {
> +       &dev_attr_measure.attr,
> +	&dev_attr_mode.attr,
> +	&dev_attr_gSelect.attr,
> +	&dev_attr_level_threshold.attr,
> +	&dev_attr_calibration.attr,
> +	NULL
> +};
> +
> +static struct attribute_group mma7455l_attr_group = {
> +       .attrs  = mma7455l_sysfs_entries,
> +};
> +
> +/* input device handling and driver core interaction */
> +static int mma7455l_input_open(struct input_dev *inp)
> +{
> +	struct mma7455l_info *mma = input_get_drvdata(inp);
> +	if (mma->mode == MMA7455L_MODE_STANDBY)
> +		update_mode(mma, MMA7455L_MODE_MEASUREMENT, mma->gSelect);
> +
> +	return 0;
> +}
> +
> +static void mma7455l_input_close(struct input_dev *inp)
> +{
> +	struct mma7455l_info *mma = input_get_drvdata(inp);
> +	update_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
> +}
> +
> +static int __devinit mma7455l_probe(struct spi_device *spi)
> +{
> +	int rc;
> +	struct mma7455l_info *mma;
> +	struct mma7455l_platform_data *pdata = spi->dev.platform_data;
> +	u_int8_t wai;
> +
> +	mma = kzalloc(sizeof(*mma), GFP_KERNEL);
> +	if (!mma)
> +		return -ENOMEM;
> +
> +	mutex_init(&mma->lock);
> +	INIT_DELAYED_WORK(&mma->work, mma7455l_work);
> +	mma->spi_dev = spi;
> +	mma->flags = 0;
> +	mma->working = 0;
> +
> +	spi_set_drvdata(spi, mma);
> +

There is a lot of repeated clean up code in the error conditions.  Use
goto and do it all at the end of the function.
> +	rc = spi_setup(spi);
> +	if (rc < 0) {
> +		printk(KERN_ERR
> +			"mma7455l error durign spi_setup of mma7455l driver\n");
> +		dev_set_drvdata(&spi->dev, NULL);
> +		kfree(mma);
> +		return rc;
> +	}
> +
> +	wai = reg_read(mma, MMA7455L_REG_WHOAMI);
> +	if (wai != MMA7455L_WHOAMI_MAGIC) {
> +		printk(KERN_ERR
> +			"mma7455l unknown whoami signature 0x%02x\n", wai);
> +		dev_set_drvdata(&spi->dev, NULL);
> +		kfree(mma);
> +		return -ENODEV;
> +	}
> +
> +	rc = request_irq(mma->spi_dev->irq, mma7455l_interrupt,
> +			IRQF_TRIGGER_HIGH, "mma7455l", mma);
> +	if (rc < 0) {
> +		dev_err(&spi->dev, "mma7455l error requesting IRQ %d\n",
> +			mma->spi_dev->irq);
> +		/* FIXME */
Fix what? I'm guessing the fact that there is no cleanup going on.
> +		return rc;
> +	}
> +
> +	rc = sysfs_create_group(&spi->dev.kobj, &mma7455l_attr_group);
> +	if (rc) {
> +		dev_err(&spi->dev, "error creating sysfs group\n");
> +		return rc;
> +	}
> +
> +	/* initialize input layer details */
> +	mma->input_dev = input_allocate_device();
> +	if (!mma->input_dev) {
> +		dev_err(&spi->dev,
> +			"mma7455l Unable to allocate input device\n");
> +		/* FIXME */
All sorts of fun could occur here ;)
> +	}
> +
> +	set_bit(EV_ABS, mma->input_dev->evbit);
> +	set_bit(ABS_X, mma->input_dev->absbit);
> +	set_bit(ABS_Y, mma->input_dev->absbit);
> +	set_bit(ABS_Z, mma->input_dev->absbit);
> +
> +	input_set_drvdata(mma->input_dev, mma);
> +	mma->input_dev->name = "MMA7455L";
> +	mma->input_dev->open = mma7455l_input_open;
> +	mma->input_dev->close = mma7455l_input_close;
> +
> +	rc = input_register_device(mma->input_dev);
> +	if (!rc) {
> +		update_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
> +
> +		mutex_lock(&mma->lock);
> +		__reg_write_10(mma, MMA7455L_REG_XOFFL,
> +				MMA7455L_REG_XOFFH, pdata->calibration_x);
> +		__reg_write_10(mma, MMA7455L_REG_YOFFL,
> +				MMA7455L_REG_YOFFH, pdata->calibration_y);
> +		__reg_write_10(mma, MMA7455L_REG_ZOFFL,
> +				MMA7455L_REG_ZOFFH, pdata->calibration_z);
> +		mutex_unlock(&mma->lock);
> +
> +		return 0;
> +	}
> +
> +	input_free_device(mma->input_dev);
> +	return rc;
> +}
> +
> +static int __devexit mma7455l_remove(struct spi_device *spi)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
> +
> +	sysfs_remove_group(&spi->dev.kobj, &mma7455l_attr_group);
> +	input_unregister_device(mma->input_dev);
> +	dev_set_drvdata(&spi->dev, NULL);
> +	kfree(mma);
> +
> +	return 0;
> +}
> +
> +#ifdef CONFIG_PM
> +static int mma7455l_suspend(struct spi_device *spi, pm_message_t message)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
> +	get_mode(mma, &mma->mode, &mma->gSelect);
> +	set_mode(mma, MMA7455L_MODE_STANDBY, MMA7455L_GSELECT_2);
> +
> +	return 0;
> +}
> +
> +static int mma7455l_resume(struct spi_device *spi)
> +{
> +	struct mma7455l_info *mma = dev_get_drvdata(&spi->dev);
> +	update_mode(mma, mma->mode, mma->gSelect);
> +
> +	return 0;
> +}
> +#else
> +#define mma7455l_suspend NULL
> +#define mma7455l_resume  NULL
> +#endif
> +
> +static struct spi_driver mma7455l_driver = {
> +	.driver = {
> +		.name	= "mma7455l",
> +		.owner	= THIS_MODULE,
> +	},
> +
> +	.probe	 = mma7455l_probe,
> +	.remove	 = __devexit_p(mma7455l_remove),
> +	.suspend = mma7455l_suspend,
> +	.resume	 = mma7455l_resume,
> +};
> +
> +static int __init mma7455l_init(void)
> +{
> +	return spi_register_driver(&mma7455l_driver);
> +}
> +
> +static void __exit mma7455l_exit(void)
> +{
> +	spi_unregister_driver(&mma7455l_driver);
> +}
> +
> +MODULE_AUTHOR("Gregoire Gentil <gregoire@gentil.com>");
> +MODULE_LICENSE("GPL");
> +
> +module_init(mma7455l_init);
> diff --git a/include/linux/mma7455l.h b/include/linux/mma7455l.h
> new file mode 100644
> index 0000000..12ab50a
> --- /dev/null
> +++ b/include/linux/mma7455l.h
> @@ -0,0 +1,11 @@
> +#ifndef _LINUX_MMA7455L_H
> +#define _LINUX_MMA7455L_H
> +
> +struct mma7455l_platform_data {
> +	/* Calibration offsets */
> +	s16 calibration_x;
> +	s16 calibration_y;
> +	s16 calibration_z;
> +};
> +
> +#endif /* _LINUX_MMA7455L_H */


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 7/8] Video driver of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18             ` [PATCH 7/8] Video " Gregoire Gentil
  2009-11-19 17:18               ` [PATCH 8/8] Additional file for " Gregoire Gentil
@ 2009-11-20  4:07               ` Hiremath, Vaibhav
  1 sibling, 0 replies; 18+ messages in thread
From: Hiremath, Vaibhav @ 2009-11-20  4:07 UTC (permalink / raw)
  To: Gregoire Gentil, linux-omap; +Cc: Tony Lindgren, Tim Yamin


> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Gregoire Gentil
> Sent: Thursday, November 19, 2009 10:48 PM
> To: linux-omap@vger.kernel.org
> Cc: Gregoire Gentil; Tony Lindgren; Tim Yamin
> Subject: [PATCH 7/8] Video driver of Always Innovating OMAP3-based
> Touch Book
> 
> 
> Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
> ---
>  drivers/video/omap/lcd_omap3touchbook.c |  130
> +++++++++++++++++++++++++++++++
>  1 files changed, 130 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/video/omap/lcd_omap3touchbook.c
> 
> diff --git a/drivers/video/omap/lcd_omap3touchbook.c
> b/drivers/video/omap/lcd_omap3touchbook.c
> new file mode 100644
> index 0000000..5b58703
> --- /dev/null
> +++ b/drivers/video/omap/lcd_omap3touchbook.c
> @@ -0,0 +1,130 @@
> +/*
> + * LCD panel support for the Touch Book
> + *
> + * Author: Gregoire Gentil <gregoire@gentil.com>
> + *
> + * Derived from drivers/video/omap/lcd-omap3beagle.c
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as published
> by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + *
> + * 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.,
> + * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +#include <linux/i2c/twl4030.h>
> +
> +#include <plat/mux.h>
> +#include <plat/omapfb.h>
> +#include <asm/mach-types.h>
> +
> +#define LCD_PANEL_ENABLE_GPIO       176
> +
> +static int omap3beagle_panel_init(struct lcd_panel *panel,
> +				struct omapfb_device *fbdev)
> +{
> +	gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable");
> +	return 0;
> +}
> +
> +static void omap3beagle_panel_cleanup(struct lcd_panel *panel)
> +{
> +	gpio_free(LCD_PANEL_ENABLE_GPIO);
> +}
> +
> +static int omap3beagle_panel_enable(struct lcd_panel *panel)
> +{
> +	gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
> +	return 0;
> +}
> +
> +static void omap3beagle_panel_disable(struct lcd_panel *panel)
> +{
> +	gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
> +}
> +
> +static unsigned long omap3beagle_panel_get_caps(struct lcd_panel
> *panel)
> +{
> +	return 0;
> +}
> +
> +struct lcd_panel omap3beagle_panel = {
> +	.name		= "omap3beagle",
> +	.config		= OMAP_LCDC_PANEL_TFT,
> +
> +	.bpp		= 16,
> +	.data_lines	= 24,
> +	.x_res		= 1024,
> +	.y_res		= 600,
> +	.hsw		= 3,
> +	.hfp		= 3,
> +	.hbp		= 39,
> +	.vsw		= 1,
> +	.vfp		= 2,
> +	.vbp		= 7,
> +
> +	.pixel_clock	= 64000,
> +
> +	.init		= omap3touchbook_panel_init,
> +	.cleanup	= omap3touchbook_panel_cleanup,
> +	.enable		= omap3touchbook_panel_enable,
> +	.disable	= omap3touchbook_panel_disable,
> +	.get_caps	= omap3touchbook_panel_get_caps,
[Hiremath, Vaibhav] Have you compiled this file? Here all references are for omap3touchbook_xxx and the function definitions are defined as omap3beagle_xxx.

And again I don't see any change except GPIO pin and LCD height from beagle here, can we try to reuse the driver.

Thanks,
Vaibhav

> +};
> +
> +static int omap3touchbook_panel_probe(struct platform_device *pdev)
> +{
> +	omapfb_register_panel(&omap3beagle_panel);
> +	return 0;
> +}
> +
> +static int omap3touchbook_panel_remove(struct platform_device
> *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap3touchbook_panel_suspend(struct platform_device
> *pdev,
> +				   pm_message_t mesg)
> +{
> +	return 0;
> +}
> +
> +static int omap3touchbook_panel_resume(struct platform_device
> *pdev)
> +{
> +	return 0;
> +}
> +
> +struct platform_driver omap3touchbook_panel_driver = {
> +	.probe		= omap3touchbook_panel_probe,
> +	.remove		= omap3touchbook_panel_remove,
> +	.suspend	= omap3touchbook_panel_suspend,
> +	.resume		= omap3touchbook_panel_resume,
> +	.driver		= {
> +		.name	= "omap3touchbook_lcd",
> +		.owner	= THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap3touchbook_panel_drv_init(void)
> +{
> +	return platform_driver_register(&omap3beagle_panel_driver);
> +}
> +
> +static void __exit omap3touchbook_panel_drv_exit(void)
> +{
> +	platform_driver_unregister(&omap3touchbook_panel_driver);
> +}
> +
> +module_init(omap3touchbook_panel_drv_init);
> +module_exit(omap3touchbook_panel_drv_exit);
> --
> 1.6.0.4
> 
> --
> 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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18   ` [PATCH 2/8] Board " Gregoire Gentil
  2009-11-19 17:18     ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Gregoire Gentil
@ 2009-11-20  4:20     ` Hiremath, Vaibhav
  2009-12-07 21:49       ` Tony Lindgren
  1 sibling, 1 reply; 18+ messages in thread
From: Hiremath, Vaibhav @ 2009-11-20  4:20 UTC (permalink / raw)
  To: Gregoire Gentil, linux-omap; +Cc: Tony Lindgren, Tim Yamin


> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Gregoire Gentil
> Sent: Thursday, November 19, 2009 10:48 PM
> To: linux-omap@vger.kernel.org
> Cc: Gregoire Gentil; Tony Lindgren; Tim Yamin
> Subject: [PATCH 2/8] Board file of Always Innovating OMAP3-based
> Touch Book
>
>
> Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
> ---
>  arch/arm/mach-omap2/board-omap3touchbook.c |  683
> ++++++++++++++++++++++++++++
>  1 files changed, 683 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-omap3touchbook.c
>
> diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c
> b/arch/arm/mach-omap2/board-omap3touchbook.c
> new file mode 100644
> index 0000000..ad3ef6e
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-omap3touchbook.c
> @@ -0,0 +1,683 @@
> +/*
> + * linux/arch/arm/mach-omap2/board-omap3touchbook.c
> + *
> + * Copyright (C) 2009 Always Innovating
> + *
> + * Modified from mach-omap2/board-omap3beagleboard.c
> + *
> + * Initial code: Grégoire Gentil, Tim Yamin
> + *
> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/delay.h>
> +#include <linux/err.h>
> +#include <linux/clk.h>
> +#include <linux/io.h>
> +#include <linux/leds.h>
> +#include <linux/gpio.h>
> +#include <linux/input.h>
> +#include <linux/gpio_keys.h>
> +
> +#include <linux/mtd/mtd.h>
> +#include <linux/mtd/partitions.h>
> +#include <linux/mtd/nand.h>
> +
> +#include <plat/mcspi.h>
> +#include <linux/spi/spi.h>
> +
> +#include <linux/spi/ads7846.h>
> +#include <linux/mma7455l.h>
> +
> +#include <plat/dmtimer.h>
> +#include <linux/backlight.h>
> +
> +#include <linux/regulator/machine.h>
> +#include <linux/i2c/twl4030.h>
> +
> +#include <mach/hardware.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach/map.h>
> +#include <asm/mach/flash.h>
> +
> +#include <plat/board.h>
> +#include <plat/common.h>
> +#include <plat/gpmc.h>
> +#include <plat/nand.h>
> +#include <plat/mux.h>
> +#include <plat/usb.h>
> +#include <plat/timer-gp.h>
> +
> +#include "mmc-twl4030.h"
> +
> +#include <asm/setup.h>
> +
> +#define GPMC_CS0_BASE  0x60
> +#define GPMC_CS_SIZE   0x30
> +
> +#define NAND_BLOCK_SIZE              SZ_128K
> +
> +#define OMAP3_AC_GPIO                136
> +#define OMAP3_TS_GPIO                162
> +#define TB_BL_PWM_TIMER              9
> +#define TB_KILL_POWER_GPIO   168
> +
> +unsigned long touchbook_revision;
> +
> +static struct mtd_partition omap3touchbook_nand_partitions[] = {
> +     /* All the partition sizes are listed in terms of NAND block
> size */
> +     {
> +             .name           = "X-Loader",
> +             .offset         = 0,
> +             .size           = 4 * NAND_BLOCK_SIZE,
> +             .mask_flags     = MTD_WRITEABLE,        /* force read-only */
> +     },
> +     {
> +             .name           = "U-Boot",
> +             .offset         = MTDPART_OFS_APPEND,   /* Offset =
> 0x80000 */
> +             .size           = 15 * NAND_BLOCK_SIZE,
> +             .mask_flags     = MTD_WRITEABLE,        /* force read-only */
> +     },
> +     {
> +             .name           = "U-Boot Env",
> +             .offset         = MTDPART_OFS_APPEND,   /* Offset =
> 0x260000 */
> +             .size           = 1 * NAND_BLOCK_SIZE,
> +     },
> +     {
> +             .name           = "Kernel",
> +             .offset         = MTDPART_OFS_APPEND,   /* Offset =
> 0x280000 */
> +             .size           = 32 * NAND_BLOCK_SIZE,
> +     },
> +     {
> +             .name           = "File System",
> +             .offset         = MTDPART_OFS_APPEND,   /* Offset =
> 0x680000 */
> +             .size           = MTDPART_SIZ_FULL,
> +     },
> +};
> +
> +static struct omap_nand_platform_data omap3touchbook_nand_data = {
> +     .options        = NAND_BUSWIDTH_16,
> +     .parts          = omap3touchbook_nand_partitions,
> +     .nr_parts       = ARRAY_SIZE(omap3touchbook_nand_partitions),
> +     .dma_channel    = -1,           /* disable DMA in OMAP NAND
> driver */
> +     .nand_setup     = NULL,
> +     .dev_ready      = NULL,
> +};
> +
> +static struct resource omap3touchbook_nand_resource = {
> +     .flags          = IORESOURCE_MEM,
> +};
> +
> +static struct platform_device omap3touchbook_nand_device = {
> +     .name           = "omap2-nand",
> +     .id             = -1,
> +     .dev            = {
> +             .platform_data  = &omap3touchbook_nand_data,
> +     },
> +     .num_resources  = 1,
> +     .resource       = &omap3touchbook_nand_resource,
> +};
> +
> +#include "sdram-micron-mt46h32m32lf-6.h"
> +
> +static struct twl4030_hsmmc_info mmc[] = {
> +     {
> +             .mmc            = 1,
> +             .wires          = 8,
> +             .gpio_wp        = 29,
> +     },
> +     {}      /* Terminator */
> +};
> +
> +static struct platform_device omap3_touchbook_lcd_device = {
> +     .name           = "omap3touchbook_lcd",
> +     .id             = -1,
> +};
> +
> +static struct omap_lcd_config omap3_touchbook_lcd_config __initdata
> = {
> +     .ctrl_name      = "internal",
> +};
> +
> +static struct regulator_consumer_supply touchbook_vmmc1_supply = {
> +     .supply                 = "vmmc",
> +};
> +
> +static struct regulator_consumer_supply touchbook_vsim_supply = {
> +     .supply                 = "vmmc_aux",
> +};
> +
> +static struct gpio_led gpio_leds[];
> +
> +static int touchbook_twl_gpio_setup(struct device *dev,
> +             unsigned gpio, unsigned ngpio)
> +{
> +     if (system_rev >= 0x20 && system_rev <= 0x34301000) {
> +             omap_cfg_reg(AG9_34XX_GPIO23);
> +             mmc[0].gpio_wp = 23;
> +     } else {
> +             omap_cfg_reg(AH8_34XX_GPIO29);
> +     }
> +     /* gpio + 0 is "mmc0_cd" (input/IRQ) */
> +     mmc[0].gpio_cd = gpio + 0;
> +     twl4030_mmc_init(mmc);
> +
> +     /* link regulators to MMC adapters */
> +     touchbook_vmmc1_supply.dev = mmc[0].dev;
> +     touchbook_vsim_supply.dev = mmc[0].dev;
> +
> +     /* REVISIT: need ehci-omap hooks for external VBUS
> +      * power switch and overcurrent detect
> +      */
> +
> +     gpio_request(gpio + 1, "EHCI_nOC");
> +     gpio_direction_input(gpio + 1);
> +
> +     /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active
> low) */
> +     gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
> +     gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
> +
> +     /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low
> LED) */
> +     gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
> +
> +     return 0;
> +}
> +
> +static struct twl4030_gpio_platform_data touchbook_gpio_data = {
> +     .gpio_base      = OMAP_MAX_GPIO_LINES,
> +     .irq_base       = TWL4030_GPIO_IRQ_BASE,
> +     .irq_end        = TWL4030_GPIO_IRQ_END,
> +     .use_leds       = true,
> +     .pullups        = BIT(1),
> +     .pulldowns      = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
> +                             | BIT(15) | BIT(16) | BIT(17),
> +     .setup          = touchbook_twl_gpio_setup,
> +};
> +
> +static struct regulator_consumer_supply touchbook_vdac_supply = {
> +     .supply         = "vdac",
> +     .dev            = &omap3_touchbook_lcd_device.dev,
> +};
> +
> +static struct regulator_consumer_supply touchbook_vdvi_supply = {
> +     .supply         = "vdvi",
> +     .dev            = &omap3_touchbook_lcd_device.dev,
> +};
> +
> +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card ==
> max 220 mA) */
> +static struct regulator_init_data touchbook_vmmc1 = {
> +     .constraints = {
> +             .min_uV                 = 1850000,
> +             .max_uV                 = 3150000,
> +             .valid_modes_mask       = REGULATOR_MODE_NORMAL
> +                                     | REGULATOR_MODE_STANDBY,
> +             .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
> +                                     | REGULATOR_CHANGE_MODE
> +                                     | REGULATOR_CHANGE_STATUS,
> +     },
> +     .num_consumer_supplies  = 1,
> +     .consumer_supplies      = &touchbook_vmmc1_supply,
> +};
> +
> +/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
> +static struct regulator_init_data touchbook_vsim = {
> +     .constraints = {
> +             .min_uV                 = 1800000,
> +             .max_uV                 = 3000000,
> +             .valid_modes_mask       = REGULATOR_MODE_NORMAL
> +                                     | REGULATOR_MODE_STANDBY,
> +             .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
> +                                     | REGULATOR_CHANGE_MODE
> +                                     | REGULATOR_CHANGE_STATUS,
> +     },
> +     .num_consumer_supplies  = 1,
> +     .consumer_supplies      = &touchbook_vsim_supply,
> +};
> +
> +/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
> +static struct regulator_init_data touchbook_vdac = {
> +     .constraints = {
> +             .min_uV                 = 1800000,
> +             .max_uV                 = 1800000,
> +             .valid_modes_mask       = REGULATOR_MODE_NORMAL
> +                                     | REGULATOR_MODE_STANDBY,
> +             .valid_ops_mask         = REGULATOR_CHANGE_MODE
> +                                     | REGULATOR_CHANGE_STATUS,
> +     },
> +     .num_consumer_supplies  = 1,
> +     .consumer_supplies      = &touchbook_vdac_supply,
> +};
> +
> +/* VPLL2 for digital video outputs */
> +static struct regulator_init_data touchbook_vpll2 = {
> +     .constraints = {
> +             .name                   = "VDVI",
> +             .min_uV                 = 1800000,
> +             .max_uV                 = 1800000,
> +             .valid_modes_mask       = REGULATOR_MODE_NORMAL
> +                                     | REGULATOR_MODE_STANDBY,
> +             .valid_ops_mask         = REGULATOR_CHANGE_MODE
> +                                     | REGULATOR_CHANGE_STATUS,
> +     },
> +     .num_consumer_supplies  = 1,
> +     .consumer_supplies      = &touchbook_vdvi_supply,
> +};
> +
> +static struct twl4030_usb_data touchbook_usb_data = {
> +     .usb_mode       = T2_USB_MODE_ULPI,
> +};
> +
> +static struct twl4030_codec_audio_data touchbook_audio_data = {
> +     .audio_mclk = 26000000,
> +};
> +
> +static struct twl4030_codec_data touchbook_codec_data = {
> +     .audio_mclk = 26000000,
> +     .audio = &touchbook_audio_data,
> +};
> +
> +static struct twl4030_platform_data touchbook_twldata = {
> +     .irq_base       = TWL4030_IRQ_BASE,
> +     .irq_end        = TWL4030_IRQ_END,
> +
> +     /* platform_data for children goes here */
> +     .usb            = &touchbook_usb_data,
> +     .gpio           = &touchbook_gpio_data,
> +     .codec          = &touchbook_codec_data,
> +     .vmmc1          = &touchbook_vmmc1,
> +     .vsim           = &touchbook_vsim,
> +     .vdac           = &touchbook_vdac,
> +     .vpll2          = &touchbook_vpll2,
> +};
> +
> +static struct i2c_board_info __initdata touchbook_i2c_boardinfo[] =
> {
> +     {
> +             I2C_BOARD_INFO("twl4030", 0x48),
> +             .flags = I2C_CLIENT_WAKE,
> +             .irq = INT_34XX_SYS_NIRQ,
> +             .platform_data = &touchbook_twldata,
> +     },
> +};
> +
> +static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] =
> {
> +     {
> +             I2C_BOARD_INFO("bq27200", 0x55),
> +     },
> +};
> +
> +static int __init omap3_touchbook_i2c_init(void)
> +{
> +     /* Standard TouchBook bus */
> +     omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo,
> +                     ARRAY_SIZE(touchbook_i2c_boardinfo));
> +
> +     /* Additional TouchBook bus */
> +     omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
> +                     ARRAY_SIZE(touchBook_i2c_boardinfo));
> +
> +     return 0;
> +}
> +
> +static void __init omap3_ads7846_init(void)
> +{
> +     if (gpio_request(OMAP3_TS_GPIO, "ads7846_pen_down")) {
> +             printk(KERN_ERR "Failed to request GPIO %d for "
> +                             "ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
> +             return;
> +     }
> +
> +     gpio_direction_input(OMAP3_TS_GPIO);
> +     omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
> +     omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa);
> +}
> +
> +static struct ads7846_platform_data ads7846_config = {
> +     .x_min                  = 100,
> +     .y_min                  = 265,
> +     .x_max                  = 3950,
> +     .y_max                  = 3750,
> +     .x_plate_ohms           = 40,
> +     .pressure_max           = 255,
> +     .debounce_max           = 10,
> +     .debounce_tol           = 5,
> +     .debounce_rep           = 1,
> +     .gpio_pendown           = OMAP3_TS_GPIO,
> +     .keep_vref_on           = 1,
> +};
> +
> +static struct omap2_mcspi_device_config ads7846_mcspi_config = {
> +     .turbo_mode     = 0,
> +     .single_channel = 1,    /* 0: slave, 1: master */
> +};
> +
> +static struct spi_board_info omap3_ads7846_spi_board_info[]
> __initdata = {
> +     {
> +             .modalias               = "ads7846",
> +             .bus_num                = 4,
> +             .chip_select            = 0,
> +             .max_speed_hz           = 1500000,
> +             .controller_data        = &ads7846_mcspi_config,
> +             .irq                    = OMAP_GPIO_IRQ(OMAP3_TS_GPIO),
> +             .platform_data          = &ads7846_config,
> +     }
> +};
> +
> +static struct gpio_led gpio_leds[] = {
> +     {
> +             .name                   = "touchbook::usr0",
> +             .default_trigger        = "heartbeat",
> +             .gpio                   = 150,
> +     },
> +     {
> +             .name                   = "touchbook::usr1",
> +             .default_trigger        = "mmc0",
> +             .gpio                   = 149,
> +     },
> +     {
> +             .name                   = "touchbook::pmu_stat",
> +             .gpio                   = -EINVAL,      /* gets replaced */
> +             .active_low             = true,
> +     },
> +};
> +
> +static struct gpio_led_platform_data gpio_led_info = {
> +     .leds           = gpio_leds,
> +     .num_leds       = ARRAY_SIZE(gpio_leds),
> +};
> +
> +static struct platform_device leds_gpio = {
> +     .name   = "leds-gpio",
> +     .id     = -1,
> +     .dev    = {
> +             .platform_data  = &gpio_led_info,
> +     },
> +};
> +
> +static struct gpio_keys_button gpio_buttons[] = {
> +     {
> +             .code                   = BTN_EXTRA,
> +             .gpio                   = 7,
> +             .desc                   = "user",
> +             .wakeup                 = 1,
> +     },
> +     {
> +             .code                   = KEY_POWER,
> +             .gpio                   = 183,
> +             .desc                   = "power",
> +             .wakeup                 = 1,
> +     },
> +};
> +
> +static struct gpio_keys_platform_data gpio_key_info = {
> +     .buttons        = gpio_buttons,
> +     .nbuttons       = ARRAY_SIZE(gpio_buttons),
> +};
> +
> +static struct platform_device keys_gpio = {
> +     .name   = "gpio-keys",
> +     .id     = -1,
> +     .dev    = {
> +             .platform_data  = &gpio_key_info,
> +     },
> +};
> +
> +static struct omap_board_config_kernel omap3_touchbook_config[]
> __initdata = {
> +     { OMAP_TAG_LCD,         &omap3_touchbook_lcd_config },
> +};
> +
> +static void __init omap3_touchbook_init_irq(void)
> +{
> +     omap_board_config = omap3_touchbook_config;
> +     omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
> +     omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
> +                          mt46h32m32lf6_sdrc_params);
> +     omap_init_irq();
> +#ifdef CONFIG_OMAP_32K_TIMER
> +     omap2_gp_clockevent_set_gptimer(12);
> +#endif
> +     omap_gpio_init();
> +}
> +
> +static struct platform_device *omap3_touchbook_devices[] __initdata
> = {
> +     &omap3_touchbook_lcd_device,
> +     &leds_gpio,
> +     &keys_gpio,
> +};
> +
> +static void __init omap3touchbook_flash_init(void)
> +{
> +     u8 cs = 0;
> +     u8 nandcs = GPMC_CS_NUM + 1;
> +
> +     u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
> +
> +     /* find out the chip-select on which NAND exists */
> +     while (cs < GPMC_CS_NUM) {
> +             u32 ret = 0;
> +             ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
> +
> +             if ((ret & 0xC00) == 0x800) {
> +                     printk(KERN_INFO "Found NAND on CS%d\n", cs);
> +                     if (nandcs > GPMC_CS_NUM)
> +                             nandcs = cs;
> +             }
> +             cs++;
> +     }
> +
> +     if (nandcs > GPMC_CS_NUM) {
> +             printk(KERN_INFO "NAND: Unable to find configuration "
> +                              "in GPMC\n ");
> +             return;
> +     }
> +
> +     if (nandcs < GPMC_CS_NUM) {
> +             omap3touchbook_nand_data.cs = nandcs;
> +             omap3touchbook_nand_data.gpmc_cs_baseaddr = (void *)
> +                     (gpmc_base_add + GPMC_CS0_BASE + nandcs *
> GPMC_CS_SIZE);
> +             omap3touchbook_nand_data.gpmc_baseaddr =
> +                                             (void *) (gpmc_base_add);
> +
> +             printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
> +             if
> (platform_device_register(&omap3touchbook_nand_device) < 0)
> +                     printk(KERN_ERR "Unable to register NAND
> device\n");
> +     }
> +}
> +
> +static void __init omap3_mma7455l_init(void)
> +{
> +     int ret;
> +
> +     ret = gpio_request(OMAP3_AC_GPIO, "mma7455l");
> +     if (ret < 0) {
> +             printk(KERN_ERR "Failed to request GPIO %d for mma7455l
> IRQ\n",
> +                     OMAP3_AC_GPIO);
> +             return;
> +     }
> +
> +     gpio_direction_input(OMAP3_AC_GPIO);
> +}
> +
> +static struct mma7455l_platform_data mma7455l_config = {
> +     .calibration_x = -4,
> +     .calibration_y = 28,
> +     .calibration_z = -28,
> +};
> +
> +static struct omap2_mcspi_device_config mma7455l_mcspi_config = {
> +     .turbo_mode     = 0,
> +     .single_channel = 1,    /* 0: slave, 1: master */
> +};
> +
> +static struct spi_board_info omap3_mma7455l_spi_board_info[]
> __initdata = {
> +     {
> +             .modalias               = "mma7455l",
> +             .bus_num                = 3,
> +             .chip_select            = 0,
> +             .max_speed_hz           = 200000,
> +             .irq                    = OMAP_GPIO_IRQ(OMAP3_AC_GPIO),
> +             .controller_data        = &mma7455l_mcspi_config,
> +             .platform_data          = &mma7455l_config,
> +     }
> +};
> +
> +static struct ehci_hcd_omap_platform_data ehci_pdata __initconst =
> {
> +
> +     .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
> +     .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
> +     .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
> +
> +     .phy_reset  = true,
> +     .reset_gpio_port[0]  = -EINVAL,
> +     .reset_gpio_port[1]  = 147,
> +     .reset_gpio_port[2]  = -EINVAL
> +};
> +
> +static int touchbook_backlight_brightness = 50;
> +static struct omap_dm_timer *touchbook_backlight_pwm;
> +
> +static int touchbook_backlight_read(struct backlight_device *bd)
> +{
> +     return touchbook_backlight_brightness;
> +}
> +
> +static int touchbook_backlight_update(struct backlight_device *bd)
> +{
> +     int value = bd->props.brightness;
> +     touchbook_backlight_brightness = value;
> +
[Hiremath, Vaibhav] I think we can get rid of variable "value" here. You can directly initialize it to "touchbook_backlight_brightness".

One more thing just came in my mind, have you thought of using standard backlight class driver???

Thanks,
Vaibhav

> +     /* Frequency calculation:
> +        - For 200Hz PWM, you want to load -164 (=> -32768Hz /
> 200Hz).
> +        - Minimum duty cycle for the backlight is 15%.
> +        - You have (164*0.85) => ~140 levels of brightness.
> +     */
> +
> +     /* For maximum brightness, just stop the timer... */
> +     if (value != bd->props.max_brightness) {
> +             /* Load the appropriate value for 200Hz PWM */
> +             u32 period = clk_get_rate(omap_dm_timer_get_fclk(
> +                                     touchbook_backlight_pwm)) / 200;
> +
> +             /* Minimum duty cycle is 15% */
> +             u32 minimum = (period * 3) / 20;
> +             u32 maximum = (period * 17) / 20;
> +
> +             /* Work out match value */
> +             u32 match = (maximum * value) / 100;
> +
> +             /* Start... */
> +             omap_dm_timer_set_load(touchbook_backlight_pwm,
> +                                     1, 0xFFFFFFFF - period - 1);
> +             omap_dm_timer_set_match(touchbook_backlight_pwm,
> +                                     1, 0xFFFFFFFF - minimum - match);
> +             omap_dm_timer_write_counter(touchbook_backlight_pwm, -
> 1);
> +             omap_dm_timer_start(touchbook_backlight_pwm);
> +     } else
> +             omap_dm_timer_stop(touchbook_backlight_pwm);
> +
> +
> +     return 0;
> +}
> +
> +static struct backlight_ops touchbook_backlight_properties = {
> +     .get_brightness = touchbook_backlight_read,
> +     .update_status = touchbook_backlight_update,
> +};
> +
> +static void __init omap3_touchbook_backlight_init(void)
> +{
> +     static struct backlight_device *bd;
> +     bd = backlight_device_register("touchbook", NULL, NULL,
> +                                     &touchbook_backlight_properties);
> +
> +     if (bd) {
> +             touchbook_backlight_pwm =
> omap_dm_timer_request_specific(
> +                             TB_BL_PWM_TIMER);
> +             omap_dm_timer_enable(touchbook_backlight_pwm);
> +             omap_dm_timer_set_source(touchbook_backlight_pwm,
> +                             OMAP_TIMER_SRC_SYS_CLK);
> +             omap_dm_timer_set_pwm(touchbook_backlight_pwm,
> +                             1, 1,
> OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
> +
> +             bd->props.max_brightness = 100;
> +             bd->props.brightness = touchbook_backlight_brightness;
> +     }
> +
> +     touchbook_backlight_update(bd);
> +}
> +
> +static void omap3_touchbook_poweroff(void)
> +{
> +     int r;
> +
> +     r = gpio_request(TB_KILL_POWER_GPIO, "DVI reset");
> +     if (r < 0) {
> +             printk(KERN_ERR "Unable to get kill power GPIO\n");
> +             return;
> +     }
> +
> +     gpio_direction_output(TB_KILL_POWER_GPIO, 0);
> +}
> +
> +static void __init early_touchbook_revision(char **p)
> +{
> +     if (!*p)
> +             return;
> +
> +     strict_strtoul(*p, 10, &touchbook_revision);
> +}
> +__early_param("tbr=", early_touchbook_revision);
> +
> +static void __init omap3_touchbook_init(void)
> +{
> +     pm_power_off = omap3_touchbook_poweroff;
> +
> +     omap3_touchbook_i2c_init();
> +     platform_add_devices(omap3_touchbook_devices,
> +                     ARRAY_SIZE(omap3_touchbook_devices));
> +     omap_serial_init();
> +
> +     omap_cfg_reg(J25_34XX_GPIO170);
> +     gpio_request(176, "DVI_nPD");
> +     /* REVISIT leave DVI powered down until it's needed ... */
> +     gpio_direction_output(176, true);
> +
> +     /* Touchscreen and accelerometer */
> +     spi_register_board_info(omap3_ads7846_spi_board_info,
> +                             ARRAY_SIZE(omap3_ads7846_spi_board_info));
> +     spi_register_board_info(omap3_mma7455l_spi_board_info,
> +                             ARRAY_SIZE(omap3_mma7455l_spi_board_info));
> +     omap3_ads7846_init();
> +     omap3_mma7455l_init();
> +
> +     omap3_touchbook_backlight_init();
> +
> +     usb_musb_init();
> +     usb_ehci_init(&ehci_pdata);
> +     omap3touchbook_flash_init();
> +
> +     /* Ensure SDRC pins are mux'd for self-refresh */
> +     omap_cfg_reg(H16_34XX_SDRC_CKE0);
> +     omap_cfg_reg(H17_34XX_SDRC_CKE1);
> +}
> +
> +static void __init omap3_touchbook_map_io(void)
> +{
> +     omap2_set_globals_343x();
> +     omap2_map_common_io();
> +}
> +
> +MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
> +     /* Maintainer: Gregoire Gentil -
> http://www.alwaysinnovating.com */
> +     .phys_io        = 0x48000000,
> +     .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
> +     .boot_params    = 0x80000100,
> +     .map_io         = omap3_touchbook_map_io,
> +     .init_irq       = omap3_touchbook_init_irq,
> +     .init_machine   = omap3_touchbook_init,
> +     .timer          = &omap_timer,
> +MACHINE_END
> --
> 1.6.0.4
>
> --
> 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

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [alsa-devel] [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book
  2009-11-19 17:18           ` [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book Gregoire Gentil
  2009-11-19 17:18             ` [PATCH 7/8] Video " Gregoire Gentil
@ 2009-11-23 15:35             ` Mark Brown
  1 sibling, 0 replies; 18+ messages in thread
From: Mark Brown @ 2009-11-23 15:35 UTC (permalink / raw)
  To: Gregoire Gentil; +Cc: linux-omap, Tony Lindgren, alsa-devel, Tim Yamin

On Thu, Nov 19, 2009 at 09:18:09AM -0800, Gregoire Gentil wrote:

> Signed-off-by: Gregoire Gentil <gregoire@gentil.com>

Please remember to CC the maintainers for the subsystem you're
submitting to on patches.

> +static irqreturn_t touchbook_headphone_event(int irq, void *snd)
> +{
> +	int status = gpio_get_value(TB_HEADPHONE_GPIO);
> +	struct snd_soc_device *socdev = platform_get_drvdata(
> +						omap3touchbook_snd_device);
> +	struct snd_soc_codec *codec = socdev->card->codec;
> +
> +	if (status) {
> +		snd_soc_dapm_disable_pin(codec, "HFL");
> +		snd_soc_dapm_disable_pin(codec, "HFR");
> +	} else {
> +		snd_soc_dapm_enable_pin(codec, "HFL");
> +		snd_soc_dapm_enable_pin(codec, "HFR");
> +	}
> +
> +	schedule_work(&jack_work);
> +	return IRQ_HANDLED;
> +}

All this jack handling should be using the standard GPIO based jack
abstraction provided by sound/soc/soc-jack.c.  That will also give
userspace visiblity of the status of the jack, allowing better
application integration.  sdp3430 and ams-delta provide examples of
using the API.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-11-20  4:20     ` [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book Hiremath, Vaibhav
@ 2009-12-07 21:49       ` Tony Lindgren
  2009-12-07 22:11         ` Tim Yamin
  0 siblings, 1 reply; 18+ messages in thread
From: Tony Lindgren @ 2009-12-07 21:49 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: Gregoire Gentil, linux-omap, Tim Yamin

Hi,

* Hiremath, Vaibhav <hvaibhav@ti.com> [091119 20:19]:
> 
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Gregoire Gentil
> > Sent: Thursday, November 19, 2009 10:48 PM
> > To: linux-omap@vger.kernel.org
> > Cc: Gregoire Gentil; Tony Lindgren; Tim Yamin
> > Subject: [PATCH 2/8] Board file of Always Innovating OMAP3-based
> > Touch Book
> >
> >
> > Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
> > ---
> >  arch/arm/mach-omap2/board-omap3touchbook.c |  683
> > ++++++++++++++++++++++++++++
> >  1 files changed, 683 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/mach-omap2/board-omap3touchbook.c
> >
> > diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c
> > b/arch/arm/mach-omap2/board-omap3touchbook.c
> > new file mode 100644
> > index 0000000..ad3ef6e
> > --- /dev/null
> > +++ b/arch/arm/mach-omap2/board-omap3touchbook.c

<snip>

> > +static int touchbook_backlight_brightness = 50;
> > +static struct omap_dm_timer *touchbook_backlight_pwm;
> > +
> > +static int touchbook_backlight_read(struct backlight_device *bd)
> > +{
> > +     return touchbook_backlight_brightness;
> > +}
> > +
> > +static int touchbook_backlight_update(struct backlight_device *bd)
> > +{
> > +     int value = bd->props.brightness;
> > +     touchbook_backlight_brightness = value;
> > +
> [Hiremath, Vaibhav] I think we can get rid of variable "value" here. You can directly initialize it to "touchbook_backlight_brightness".
> 
> One more thing just came in my mind, have you thought of using standard backlight class driver???

I'll add this without the backlight code so we get the basic
support into mainline while using the backlight class driver
issue is being discussed.

Tony

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-12-07 21:49       ` Tony Lindgren
@ 2009-12-07 22:11         ` Tim Yamin
  2009-12-07 23:19           ` Tony Lindgren
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Yamin @ 2009-12-07 22:11 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Hiremath, Vaibhav, Gregoire Gentil, linux-omap

2009/12/7 Tony Lindgren <tony@atomide.com>:
>> One more thing just came in my mind, have you thought of using standard backlight class driver???
>
> I'll add this without the backlight code so we get the basic
> support into mainline while using the backlight class driver
> issue is being discussed.

But the board file *is* implementing the standard backlight class,
i.e. the interface in linux/backlight.h... perhaps I'm
misunderstanding the intention here?

Tim

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-12-07 22:11         ` Tim Yamin
@ 2009-12-07 23:19           ` Tony Lindgren
  2009-12-08 16:19             ` Hiremath, Vaibhav
  0 siblings, 1 reply; 18+ messages in thread
From: Tony Lindgren @ 2009-12-07 23:19 UTC (permalink / raw)
  To: Tim Yamin; +Cc: Hiremath, Vaibhav, Gregoire Gentil, linux-omap

* Tim Yamin <plasmaroo@gmail.com> [091207 14:10]:
> 2009/12/7 Tony Lindgren <tony@atomide.com>:
> >> One more thing just came in my mind, have you thought of using standard backlight class driver???
> >
> > I'll add this without the backlight code so we get the basic
> > support into mainline while using the backlight class driver
> > issue is being discussed.
> 
> But the board file *is* implementing the standard backlight class,
> i.e. the interface in linux/backlight.h... perhaps I'm
> misunderstanding the intention here?

Hmm, yeah. Hiremath care to clarify what you had in mind
with that standard backlight class driver comment?

Regards,

Tony

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book
  2009-12-07 23:19           ` Tony Lindgren
@ 2009-12-08 16:19             ` Hiremath, Vaibhav
  0 siblings, 0 replies; 18+ messages in thread
From: Hiremath, Vaibhav @ 2009-12-08 16:19 UTC (permalink / raw)
  To: Tony Lindgren, Tim Yamin; +Cc: Gregoire Gentil, linux-omap

> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Tuesday, December 08, 2009 4:49 AM
> To: Tim Yamin
> Cc: Hiremath, Vaibhav; Gregoire Gentil; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 2/8] Board file of Always Innovating OMAP3-based
> Touch Book
> 
> * Tim Yamin <plasmaroo@gmail.com> [091207 14:10]:
> > 2009/12/7 Tony Lindgren <tony@atomide.com>:
> > >> One more thing just came in my mind, have you thought of using
> standard backlight class driver???
> > >
> > > I'll add this without the backlight code so we get the basic
> > > support into mainline while using the backlight class driver
> > > issue is being discussed.
> >
> > But the board file *is* implementing the standard backlight class,
> > i.e. the interface in linux/backlight.h... perhaps I'm
> > misunderstanding the intention here?
> 
> Hmm, yeah. Hiremath care to clarify what you had in mind
> with that standard backlight class driver comment?
> 
[Hiremath, Vaibhav] I was referring to generic_bl driver? Actually when I had submitted the similar patch for OMAP3EVM, I had received similar comment to use generic_bl interface.

In your case, you just need to do something - 


static void touchbook_set_backlight(int intensity)
{
....
}
static struct generic_bl_info touchbook_bl_platform_data = {
	.name			= " touchbook-bklight",
	.max_intensity		= 100,
	.default_intensity	= 50,
	.limit_mask		= 0,
	.set_bl_intensity	= touchbook_set_backlight,
	.kick_battery		= NULL,
};

static struct platform_device touchbook_bklight_device = {
	.name		= "generic-bl",
	.id		= -1,
	.dev		= {
		.platform_data	= & touchbook_bl_platform_data,
	},
};


Thanks,
Vaibhav

> Regards,
> 
> Tony

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-12-08 16:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19 17:18 [PATCH 0/8] AI TB: Always Innovating OMAP3-based Touch Book Gregoire Gentil
2009-11-19 17:18 ` [PATCH 1/8] defconfig file of " Gregoire Gentil
2009-11-19 17:18   ` [PATCH 2/8] Board " Gregoire Gentil
2009-11-19 17:18     ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Gregoire Gentil
2009-11-19 17:18       ` [PATCH 4/8] Driver for Always Innovating OMAP3-based Touch Book keyboard Gregoire Gentil
2009-11-19 17:18         ` [PATCH 5/8] HID file " Gregoire Gentil
2009-11-19 17:18           ` [PATCH 6/8] Audio driver of Always Innovating OMAP3-based Touch Book Gregoire Gentil
2009-11-19 17:18             ` [PATCH 7/8] Video " Gregoire Gentil
2009-11-19 17:18               ` [PATCH 8/8] Additional file for " Gregoire Gentil
2009-11-20  4:07               ` [PATCH 7/8] Video driver of " Hiremath, Vaibhav
2009-11-23 15:35             ` [alsa-devel] [PATCH 6/8] Audio " Mark Brown
2009-11-19 17:37           ` [PATCH 5/8] HID file for Always Innovating OMAP3-based Touch Book keyboard Koen Kooi
2009-11-19 19:24       ` [PATCH 3/8] Freescale MMA7455 accelerometer driver Jonathan Cameron
2009-11-20  4:20     ` [PATCH 2/8] Board file of Always Innovating OMAP3-based Touch Book Hiremath, Vaibhav
2009-12-07 21:49       ` Tony Lindgren
2009-12-07 22:11         ` Tim Yamin
2009-12-07 23:19           ` Tony Lindgren
2009-12-08 16:19             ` Hiremath, Vaibhav

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.