[rtc-linux] QA/Business Consultant / St. Louis,MO

2019-05-01 Thread venkat
*Hello,*


*Please find the requirement below, if you find yourself comfortable with
the requirement please reply with your updated resume to
**ven...@sovereigntec.com
*





QA/Business Consultant

St. Louis,MO

6 Months+







*Job Overview:*

The QA Test Lead will assist in facilitating key requirements with
stakeholders and customers using standard and User Experience techniques.



The QA Test Lead works with other Consultants and Project Managers to
assist with daily operations exercising time management, communication and
collaboration in a fast-paced environment to ensure the successful delivery
of projects. The QA Test Lead will interface with Perficient technical and
business delivery personnel, as well as vendors and customers on a regular
basis.





   - Be the on-site “point person” for relaying information to the off-site
   QA team
   - Create manual/automated test scripts by leveraging requirements
   documentations, wire-frames, comps and iRise simulations
   - Execute test cases for web based applications using manual /automated
   scripts
   - Log / manage defects in defect tracking system
   - Participate in standing team meetings
   - Contribute to weekly status reports, interact with clients and vendors
   as needed
   - Troubleshoot and track defects
   - Build trusted client relationships through proactive account
   management and effective project delivery
   - Establishes knowledge of client business challenges and priorities to
   translate into opportunities
   - Maintains regular client communication and satisfaction, ensuring
   opportunities and challenges are addressed in a timely manner.
   - Translate client’s business needs into detailed business requirements
   documents, use cases and systems interaction diagrams.
   - Helps establish project test strategy, methodologies, test plans as
   well as assist with test execution.


   - 7+ years overall experience with a minimum of 2 years of experience as
   a QA Lead managing offsite teams.
   - Must have experience in automation for the front end and web services
   using Selenium for the front end.
   - Must have experience writing test cases, test plans.
   - Experience with a defect tracking tool: preferably Azure DevOps(TSF,
   VSTS)
   - Previous experience testing API’s (discovery testing, usability
   testing, security testing and documentation)
   - Strong communication skills with the ability to interface and
   strategize directly with the end client
   - Previous experience testing applications in a .NET environment
   preferred.
   - Experience working with external clients.
   - Experience with Agile and iterative development methodologies
   - Highly detail oriented, well organized, and able to coordinate
   multiple projects
   - Energetic, motivated, service-oriented, and be able to multi task.








Regards

Venkat

*ven...@sovereigntec.com *

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] Technical Scrum Master / Pleasanton, CA

2019-05-01 Thread venkat
*Hello,*


*Please find the requirement below, if you find yourself comfortable with
the requirement please reply with your updated resume to
**ven...@sovereigntec.com
*



*Technical Scrum Master *
Pleasanton, CA
12 Months+


The project manager will have complete responsibility for the day-to-day
management of the engagement, including all aspects related to managing our
consulting team, resulting in a successful delivery and a satisfied,
reference-able client.

*Responsibilities:*

   - Understand complexities of a large program and provide guidance for
   the development teams.
   - Interact with product managers and other organizational units such as
   QA, operations, and external IT partners.
   - Negotiate scope, schedule, and funding with external IT and business
   partners.
   - Establish common goals across multiple teams, and define useful
   metrics and reporting to track team performance.
   - Manage milestones across multiple teams.
   - Lead teams of engineers through the completion of all phases of the
   project.

 *Qualifications:*

   - 10+ years of consulting industry experience, with strong relationship
   management, account management, and sales support experience.
   - Must have had Program Management experience in setting up and running
   a PMO and should be able to manage multiple projects on different tracks.
   - Highly proficient in collaborating with project stakeholders,
   end-users, business partners, and technical team members to deliver high
   quality projects.
   - Hands on with project documentation. Well-versed in industry
   best-practices and current technologies.
   - Must have prior background in managing large, multi-team engagements.
   - Experience with Global Delivery Model is preferred.
   - Hands-on experience with proposal creation and leading proposal
   presentations.
   - Excellent leadership, interpersonal, communication and presentation
   skills.
   - Wide variety of IT and business consulting engagement experience.
   - Flexibility to travel.
   - Bachelor’s degree or foreign equivalent required from an accredited
   institution.

*Preferred skills:*



PMP Certification

Scrum/Agile Methodology







Regards

Venkat

*ven...@sovereigntec.com *

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] Full Stack Developer (Java, Backbone.js) /US-CA-Pleasanton-Any Visa (Expect H1B Transfer / CPT )

2019-05-16 Thread venkat
Hello

Hope you are doing good,

Please go through the below requirement and share me suitable resume along
with contact details.

*Job Title: Full Stack Developer (Java, Backbone.js)*

*Location: US-CA-Pleasanton*

*Status : Any Visa (Expect H1B Transfer / CPT )*

*Interview : Phone / F2F Interview*

*Job Overview:*



As a Lead Technical Consultant you will participate in all aspects of the
software development lifecycle which includes estimating, technical design,
implementation, documentation, testing, deployment and support of
application developed for our clients. As a member working in a team
environment you will work with solution architects and developers on
interpretation/translation of wireframes and creative designs into
functional requirements, and subsequently into technical design.





*Responsibilities:*

   - Lead the technical planning & requirements gathering phases including
   estimate, develop, test, manage projects, architect and deliver.
   - Serve as a technical lead and mentor.  Provide technical support or
   leadership in the development and continual improvement of service.
   - Develop and maintain effective working relationships with team members.
   - Demonstrate the ability to adapt and work with team members of various
   experience level.





*Qualifications:*

   - Passionate coders with 8+ years of application development experience.
   - Must be Full Stack Java Developer with JEE, Spring Boot, and Node.js.
   - Client facing or consulting experience highly preferred.
   - Java/JavaEE (must have at least Java 8)
   - Strong Expertise with front-end technologies: Javascript (ES6),
   Backbone.js, HTML5/CSS3
   - Experience in Mocha and Chai testing frameworks and AEM is preferred
   - Skilled problem solvers with the desire and proven ability to create
   innovative solutions.
   - Flexible and adaptable attitude, disciplined to manage multiple
   responsibilities and adjust to varied environments.
   - Future technology leaders- dynamic individuals energized by fast paced
   personal and professional growth.
   - Phenomenal communicators who can explain and present concepts to
   technical and non-technical audiences alike, including high level decision
   makers.
   - Bachelor’s Degree in MIS, Computer Science, Math, Engineering or
   comparable major.
   - Solid foundation in Computer Science, with strong competencies in data
   structures, algorithms and software design.
   - Knowledge and experience in developing software using agile
   methodologies.
   - Proficient in authoring, editing and presenting technical documents.
   - Ability to communicate effectively via multiple channels (verbal,
   written, etc.) with technical and non-technical staff



Regards
ven...@sovereigntec.com

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rtc-linux/CAMZymAOM2_6sxSR_rNcZedhEqFsVKjv2GU%3D8G3VYFp6Cx3w7iA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] .Net Developer / Omaha,NE/ Open for Any Visa (Expect H1B Transfer)

2019-06-17 Thread venkat
Hello,


Hope you are doing great,



Please go through the below requirement  and share me your updated Hotlist
on daily basis to ven...@sovereigntec.com





*.Net Developer*

*Omaha,NE*

*Open for Any Visa (Expect H1B Transfer)*

*Interview : Telephonic / Skype or F2F Interview*





 .*Net Micro-services Developer with some exposure to Java* located at out
client site in Omaha, NE.  Resources are expected to be on client site and
client will pay for travel.  Travel is alternate weeks to every week M-Thu.



*Job Overview:*

As a Lead Technical Consultant you will participate in all aspects of the
software development lifecycle which includes estimating, technical design,
implementation, documentation, testing, deployment and support of
application developed for our clients. As a member working in a team
environment you will work with solution architects and developers on
interpretation/translation of wireframes and creative designs into
functional requirements, and subsequently into technical design.



   - Lead the technical planning & requirements gathering phases including
   estimate, develop, test, manage projects, architect and deliver.
   - Serve as a technical lead and mentor.  Provide technical support or
   leadership in the development and continual improvement of service.
   - Develop and maintain effective working relationships with team members.
   - Demonstrate the ability to adapt and work with team members of various
   experience level.



*Qualifications:*

   - 2-5 years of experience in Cloud technologies (Pivotal Cloud Foundry
   Preferred)
   - Strong hands on development experience in .Net or Java/Spring Boot,
   Microservices Architecture
   - Hands on experience in building scalable micro services using modern
   stack (PCF, .Net and Java/Spring Boot)
   - Experience in open source products, nosql dbs, modern caching products
   is highly preferred
   - Experience in Test Driven Development (TDD) will be highly preferred
   - Experience with Pair Programming or be open to Pair Programming
   - Passionate coders with 3-5 years of application development experience.
   - Client facing or consulting experience highly preferred
   - Skilled problem solvers with the desire and proven ability to create
   innovative solutions.
   - Flexible and adaptable attitude, disciplined to manage multiple
   responsibilities and adjust to varied environments.
   - Future technology leaders- dynamic individuals energized by fast paced
   personal and professional growth.
   - Phenomenal communicators who can explain and present concepts to
   technical and non-technical audiences alike, including high level decision
   makers.
   - Bachelor’s Degree in MIS, Computer Science, Math, Engineering or
   comparable major.
   - Solid foundation in Computer Science, with strong competencies in data
   structures, algorithms and software design.
   - Knowledge and experience in developing software using agile
   methodologies.
   - Proficient in authoring, editing and presenting technical documents.
   - Ability to communicate effectively via multiple channels (verbal,
   written, etc.) with technical and non-technical staff.

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rtc-linux/CAMZymAOnYOjxXf-Z3U_HrcCrUs9RiiTr1Y4hGqj7O6S6%3DAstJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] [PATCH v4] rtc:add support for maxim rtc max6916

2016-05-16 Thread venkat . prashanth2498
From: VENKAT PRASHANTH B U 

This is a patch to add support for
maxim rtc max6916

Signed-off-by: Venkat Prashanth B U 
---
changelog v4:
- fixed the line wrapping to around 72 characters
- Aligned the values with tabs
- inserted the correct coding style in the conditional statements
- removed the empty lines towards the end of the code
- fixed the checkpatch issues
- code clean up on max6916_read_reg()

changelog v3:
- saperated the logical code sections with an empty line
- used indentations after if statements.
- fixed the out of tree makefile
- placed the test condition at the begining of the function

change log v2:
- deleted the port i/o's
- clock burst value is modified from 0x00 to 0x3F
- The time in linux is in binary format so get_rtc()replaced with bcd2bin()
- enforced the year range instead of accepting any value
---
---
 drivers/rtc/Kconfig|  12 
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-max6916.c  | 167 
++
 3 files changed, 180 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 83b4b89..5bc38f0 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,6 +681,18 @@ config RTC_DRV_MAX6902
  This driver can also be built as a module. If so, the module
  will be called rtc-max6902.
 
+config RTC_DRV_MAX6916
+   tristate "Maxim MAX6916"
+   help
+ If you say yes here you will get support for the
+ Maxim MAX6916 SPI RTC chip.
+
+ This driver only supports the RTC feature, and not other chip
+ features such as alarms.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-max6916.
+
 config RTC_DRV_R9701
tristate "Epson RTC-9701JE"
help
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 1b09a62..702c167 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -84,6 +84,7 @@ obj-$(CONFIG_RTC_DRV_M48T59)  += rtc-m48t59.o
 obj-$(CONFIG_RTC_DRV_M48T86)   += rtc-m48t86.o
 obj-$(CONFIG_RTC_DRV_MAX6900)  += rtc-max6900.o
 obj-$(CONFIG_RTC_DRV_MAX6902)  += rtc-max6902.o
+obj-$(CONFIG_RTC_DRV_MAX6916)  += rtc-max6916.o
 obj-$(CONFIG_RTC_DRV_MAX77686) += rtc-max77686.o
 obj-$(CONFIG_RTC_DRV_MAX77802) += rtc-max77802.o
 obj-$(CONFIG_RTC_DRV_MAX8907)  += rtc-max8907.o
diff --git a/drivers/rtc/rtc-max6916.c b/drivers/rtc/rtc-max6916.c
index e69de29..4d1ef9a 100644
--- a/drivers/rtc/rtc-max6916.c
+++ b/drivers/rtc/rtc-max6916.c
@@ -0,1 +1,167 @@
+/* rtc-max6916.c
+ *
+ * Driver for MAXIM  max6916 Low Current, SPI Compatible
+ * Real Time Clock
+ *
+ * Author : Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* Registers in max6916 rtc */
+
+#define MAX6916_SECONDS_REG0x01
+#define MAX6916_MINUTES_REG0x02
+#define MAX6916_HOURS_REG  0x03
+#define MAX6916_DATE_REG   0x04
+#define MAX6916_MONTH_REG  0x05
+#define MAX6916_DAY_REG0x06
+#define MAX6916_YEAR_REG   0x07
+#define MAX6916_CONTROL_REG0x08
+#define MAX6916_STATUS_REG 0x0C
+#define MAX6916_CLOCK_BURST0x3F
+
+static int max6916_read_reg(struct device *dev, unsigned char address,
+   unsigned char *data)
+{
+   struct spi_device *spi = to_spi_device(dev);
+
+   *data = address | 0x80;
+
+   return spi_write_then_read(spi, data, 1, data, 1);
+}
+
+static int max6916_write_reg(struct device *dev, unsigned char address,
+unsigned char data)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[2];
+
+   buf[0] = address&0x7F;
+   buf[1] = data;
+
+   return spi_write_then_read(spi, buf, 2, NULL, 0);
+}
+
+static int max6916_read_time(struct device *dev, struct rtc_time *dt)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   int err;
+   unsigned char buf[8];
+
+   buf[0] = MAX6916_CLOCK_BURST | 0x80;
+
+   err = spi_write_then_read(spi, buf, 1, buf, 8);
+
+   if (err)
+   return err;
+
+   dt->tm_sec = bcd2bin(buf[0]);
+   dt->tm_min = bcd2bin(buf[1]);
+   dt->tm_hour = bcd2bin(buf[2] & 0x3F);
+   dt->tm_mday = bcd2bin(buf[3]);
+   dt->tm_mon = bcd2bin(buf[4]) - 1;
+   dt->tm_wday = bcd2bin(buf[5]) - 1;
+   dt->tm_year = bcd2bin(buf[6]) + 100;
+
+   return rtc_valid_tm(dt);
+}
+
+static int max6916_set_time(struct device *dev, struct rtc_time *dt)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[9];
+
+   if (dt->tm_year < 100 || dt->tm_year > 199) {
+   dev_err(&spi->dev, "Year must be between 2000 and 2099. It&

[rtc-linux] [PATCH v4] rtc:add support for maxim rtc max6916

2016-05-31 Thread venkat . prashanth2498
From: VENKAT PRASHANTH B U 

This is a patch to add support for
maxim rtc max6916

Signed-off-by: Venkat Prashanth B U 
---
changelog v4:
- fixed the line wrapping to around 72 characters
- Aligned the values with tabs
- inserted the correct coding style in the conditional statements
- removed the empty lines towards the end of the code
- fixed the checkpatch issues
- code clean up on max6916_read_reg()

changelog v3:
- saperated the logical code sections with an empty line
- used indentations after if statements.
- fixed the out of tree makefile
- placed the test condition at the begining of the function

change log v2:
- deleted the port i/o's
- clock burst value is modified from 0x00 to 0x3F
- The time in linux is in binary format so get_rtc()replaced with bcd2bin()
- enforced the year range instead of accepting any value
---
---
 drivers/rtc/Kconfig|  12 
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-max6916.c  | 167 
++
 3 files changed, 180 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 83b4b89..5bc38f0 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,6 +681,18 @@ config RTC_DRV_MAX6902
  This driver can also be built as a module. If so, the module
  will be called rtc-max6902.
 
+config RTC_DRV_MAX6916
+   tristate "Maxim MAX6916"
+   help
+ If you say yes here you will get support for the
+ Maxim MAX6916 SPI RTC chip.
+
+ This driver only supports the RTC feature, and not other chip
+ features such as alarms.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-max6916.
+
 config RTC_DRV_R9701
tristate "Epson RTC-9701JE"
help
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 1b09a62..702c167 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -84,6 +84,7 @@ obj-$(CONFIG_RTC_DRV_M48T59)  += rtc-m48t59.o
 obj-$(CONFIG_RTC_DRV_M48T86)   += rtc-m48t86.o
 obj-$(CONFIG_RTC_DRV_MAX6900)  += rtc-max6900.o
 obj-$(CONFIG_RTC_DRV_MAX6902)  += rtc-max6902.o
+obj-$(CONFIG_RTC_DRV_MAX6916)  += rtc-max6916.o
 obj-$(CONFIG_RTC_DRV_MAX77686) += rtc-max77686.o
 obj-$(CONFIG_RTC_DRV_MAX77802) += rtc-max77802.o
 obj-$(CONFIG_RTC_DRV_MAX8907)  += rtc-max8907.o
diff --git a/drivers/rtc/rtc-max6916.c b/drivers/rtc/rtc-max6916.c
index e69de29..4d1ef9a 100644
--- a/drivers/rtc/rtc-max6916.c
+++ b/drivers/rtc/rtc-max6916.c
@@ -0,1 +1,167 @@
+/* rtc-max6916.c
+ *
+ * Driver for MAXIM  max6916 Low Current, SPI Compatible
+ * Real Time Clock
+ *
+ * Author : Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* Registers in max6916 rtc */
+
+#define MAX6916_SECONDS_REG0x01
+#define MAX6916_MINUTES_REG0x02
+#define MAX6916_HOURS_REG  0x03
+#define MAX6916_DATE_REG   0x04
+#define MAX6916_MONTH_REG  0x05
+#define MAX6916_DAY_REG0x06
+#define MAX6916_YEAR_REG   0x07
+#define MAX6916_CONTROL_REG0x08
+#define MAX6916_STATUS_REG 0x0C
+#define MAX6916_CLOCK_BURST0x3F
+
+static int max6916_read_reg(struct device *dev, unsigned char address,
+   unsigned char *data)
+{
+   struct spi_device *spi = to_spi_device(dev);
+
+   *data = address | 0x80;
+
+   return spi_write_then_read(spi, data, 1, data, 1);
+}
+
+static int max6916_write_reg(struct device *dev, unsigned char address,
+unsigned char data)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[2];
+
+   buf[0] = address&0x7F;
+   buf[1] = data;
+
+   return spi_write_then_read(spi, buf, 2, NULL, 0);
+}
+
+static int max6916_read_time(struct device *dev, struct rtc_time *dt)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   int err;
+   unsigned char buf[8];
+
+   buf[0] = MAX6916_CLOCK_BURST | 0x80;
+
+   err = spi_write_then_read(spi, buf, 1, buf, 8);
+
+   if (err)
+   return err;
+
+   dt->tm_sec = bcd2bin(buf[0]);
+   dt->tm_min = bcd2bin(buf[1]);
+   dt->tm_hour = bcd2bin(buf[2] & 0x3F);
+   dt->tm_mday = bcd2bin(buf[3]);
+   dt->tm_mon = bcd2bin(buf[4]) - 1;
+   dt->tm_wday = bcd2bin(buf[5]) - 1;
+   dt->tm_year = bcd2bin(buf[6]) + 100;
+
+   return rtc_valid_tm(dt);
+}
+
+static int max6916_set_time(struct device *dev, struct rtc_time *dt)
+{
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[9];
+
+   if (dt->tm_year < 100 || dt->tm_year > 199) {
+   dev_err(&spi->dev, "Year must be between 2000 and 2099. It&

[rtc-linux] [PATCH] rtc: add support for maxim dallas ds1682

2017-11-26 Thread venkat . prashanth2498
From: Venkat Prashanth B U 

Add supporting driver for Dallas Semiconductor
DS1682 2 wire total elapsed time recorder.

Signed-off-by: Venkat Prashanth B U 
---
 drivers/rtc/rtc-ds1682.c | 284 +++
 1 file changed, 284 insertions(+)

diff --git a/drivers/rtc/rtc-ds1682.c b/drivers/rtc/rtc-ds1682.c
index e69de29..a21c94d 100644
--- a/drivers/rtc/rtc-ds1682.c
+++ b/drivers/rtc/rtc-ds1682.c
@@ -0,0 +1,284 @@
+/* Driver for Dallas Semiconductor DS1682 2 wire total elapsed
+ * time recorder
+ *
+ * Author : Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DS1682_READ_MEMORY_CMD 0x1D
+
+#ifndef __LINUX_DS1682_H
+#define __LINUX_DS1682_H
+
+const struct ds1682_platform_data {
+
+   unsigned int gpio_rst;
+   unsigned int gpio_clk;
+   unsigned int gpio_dq;
+};
+#endif
+
+const struct ds1682;
+
+const struct ds1682_chip_ops {
+   int (*map_io)(const struct ds1682 *chip, struct platform_device *pdev,
+ const struct ds1682_platform_data *pdata);
+   void (*unmap_io)(const struct ds1682 *chip);
+};
+
+#define DS1682_RST 0
+#define DS1682_CLK 1
+#define DS1682_DQ  2
+
+const struct ds1682_gpio {
+   const char *name;
+   unsigned int gpio;
+};
+
+const struct ds1682 {
+   const struct ds1682_gpio *gpio;
+   const struct ds1682_chip_ops *ops;
+   const struct rtc_device *rtc;
+};
+
+const struct ds1682_gpio ds1682_gpio[] = {
+   { "RTC RST", 0 },
+   { "RTC CLK", 0 },
+   { "RTC DQ", 0 },
+};
+
+int ds1682_gpio_map(const struct ds1682 *chip, struct platform_device *pdev,
+ const struct ds1682_platform_data *pdata)
+{
+   int i, err;
+
+   ds1682_gpio[DS1682_RST].gpio = pdata->gpio_rst;
+   ds1682_gpio[DS1682_CLK].gpio = pdata->gpio_clk;
+   ds1682_gpio[DS1682_DQ].gpio = pdata->gpio_dq;
+
+   for (i = 0; i < ARRAY_SIZE(ds1682_gpio); i++) {
+   err = gpio_request(ds1682_gpio[i].gpio, ds1682_gpio[i].name);
+   if (err) {
+   dev_err(&pdev->dev, "error mapping gpio %s: %d\n",
+   ds1682_gpio[i].name, err);
+   goto err_request;
+   }
+   if (i != DS1682_DQ)
+   gpio_direction_output(ds1682_gpio[i].gpio, 1);
+   }
+
+   chip->gpio = ds1682_gpio;
+   return 0;
+
+err_request:
+   while (--i >= 0)
+   gpio_free(ds1682_gpio[i].gpio);
+   return err;
+}
+
+static void ds1682_gpio_unmap(const struct ds1682 *chip)
+{
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(ds1682_gpio); i++)
+   gpio_free(ds1682_gpio[i].gpio);
+}
+
+static const struct ds1682_chip_ops ds1682_gpio_ops = {
+   .map_io = ds1682_gpio_map,
+   .unmap_io   = ds1682_gpio_unmap,
+};
+
+static void ds1682_reset(const struct device *dev)
+{
+   gpio_set_value(ds1682_gpio[DS1682_RST].gpio, 0);
+   udelay(1000);
+   gpio_set_value(ds1682_gpio[DS1682_RST].gpio, 1);
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 0);
+   gpio_direction_output(ds1682_gpio[DS1682_DQ].gpio, 0);
+   udelay(10);
+}
+
+static void ds1682_write_byte(const struct device *dev, u8 byte)
+{
+   int i;
+
+   gpio_direction_output(ds1682_gpio[DS1682_DQ].gpio, 1);
+   for (i = 0; i < 8; i++) {
+   gpio_set_value(ds1682_gpio[DS1682_DQ].gpio, byte & (1 << i));
+   udelay(10);
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 1);
+   udelay(10);
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 0);
+   udelay(10);
+   }
+}
+
+static u8 ds1682_read_byte(const struct device *dev)
+{
+   int i;
+   u8 ret = 0;
+
+   gpio_direction_input(ds1682_gpio[DS1682_DQ].gpio);
+
+   for (i = 0; i < 8; i++) {
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 0);
+   udelay(10);
+   if (gpio_get_value(ds1682_gpio[DS1682_DQ].gpio))
+   ret |= 1 << i;
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 1);
+   udelay(10);
+   }
+   return ret;
+}
+
+static void ds1682_read_memory(const struct device *dev, u16 offset,
+  int length, u8 *out)
+{
+   ds1682_reset(dev);
+   ds1682_write_byte(dev, DS1682_READ_MEMORY_CMD);
+   ds1682_write_byte(dev, offset & 0xff);
+   ds1682_write_byte(dev, (offset >> 8) & 0xff);
+   while (length--)
+   *out++ = ds1682_read_byte(dev);
+}
+
+static void ds168

[rtc-linux] [PATCH] rtc: rtc-ds1683 Maxim/Dallas I2C compatible

2017-11-29 Thread venkat . prashanth2498
From: Venkat Prashanth B U 

This is a patch to add support for
maxim/dallas I2C rtc ds1683 chip.

Signed-off-by: Venkat Prashanth B U 
---
 drivers/rtc/Kconfig  |   9 +++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-ds1683.c | 203 +++
 3 files changed, 213 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e0e58f3..2528b79 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -294,6 +294,15 @@ config RTC_DRV_DS1672
  This driver can also be built as a module. If so, the module
  will be called rtc-ds1672.

+config RTC_DRV_DS1683
+   tristate "Dallas/Maxim DS1683"
+   help
+ If you say yes here you get support for the
+ Dallas/Maxim DS1683 I2C timekeeping chip.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-ds1683.
+
 config RTC_DRV_HYM8563
tristate "Haoyu Microelectronics HYM8563"
depends on OF
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 0bf1fc0..a6f4419 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -62,6 +62,7 @@ obj-$(CONFIG_RTC_DRV_DS1390)  += rtc-ds1390.o
 obj-$(CONFIG_RTC_DRV_DS1511)   += rtc-ds1511.o
 obj-$(CONFIG_RTC_DRV_DS1553)   += rtc-ds1553.o
 obj-$(CONFIG_RTC_DRV_DS1672)   += rtc-ds1672.o
+obj-$(CONFIG_RTC_DRV_DS1683)   += rtc-ds1683.o
 obj-$(CONFIG_RTC_DRV_DS1685_FAMILY)+= rtc-ds1685.o
 obj-$(CONFIG_RTC_DRV_DS1742)   += rtc-ds1742.o
 obj-$(CONFIG_RTC_DRV_DS2404)   += rtc-ds2404.o
diff --git a/drivers/rtc/rtc-ds1683.c b/drivers/rtc/rtc-ds1683.c
index e69de29..7b6dac3 100644
--- a/drivers/rtc/rtc-ds1683.c
+++ b/drivers/rtc/rtc-ds1683.c
@@ -0,0 +1,203 @@
+/* rtc-ds1683.c
+ *
+ * Driver for Maxim/Dallas ds1683, I2C Compatible
+ * Real Time Clock
+ *
+ * Author : Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+
+/* Registers */
+
+#define ds1683_REG_CNT_BASE0
+#define ds1683_REG_EVENT   4
+
+#define ds1683_REG_CONTROL_EOSC0x80
+
+static struct i2c_driver ds1683_driver;
+
+static int ds1683_get_datetime(struct i2c_client *client, struct rtc_time *tm)
+{
+   unsigned long time;
+   unsigned char addr = ds1683_REG_CNT_BASE;
+   unsigned char buf[4];
+
+   struct i2c_msg msgs[] = {
+   {   /* setup read pointer */
+   .addr = client->addr,
+   .len = 1,
+   .buf = &addr
+   },
+   {/* read date */
+   .addr = client->addr,
+   .flags = I2C_M_RD,
+   .len = 4,
+   .buf = buf
+   },
+   };
+
+   /* read date registers */
+   if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
+   dev_err(&client->dev, "%s: read error\n", __func__);
+   return -EIO;
+   }
+
+   time = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+
+   rtc_time_to_tm(time, tm);
+
+   return 0;
+}
+
+static int ds1683_set_mmss(struct i2c_client *client, unsigned long secs)
+{
+   int xfer;
+   unsigned char buf[6];
+
+   buf[0] = ds1683_REG_CNT_BASE;
+   buf[1] = secs & 0x00FF;
+   buf[2] = (secs & 0xFF00) >> 8;
+   buf[3] = (secs & 0x00FF) >> 16;
+   buf[4] = (secs & 0xFF00) >> 24;
+   buf[5] = 0; /* set control reg to enable counting */
+
+   xfer = i2c_master_send(client, buf, 6);
+   if (xfer != 6) {
+   dev_err(&client->dev, "%s: send: %d\n", __func__, xfer);
+   return -EIO;
+   }
+
+   return 0;
+}
+
+static int ds1683_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+   return ds1683_get_datetime(to_i2c_client(dev), tm);
+}
+
+static int ds1683_rtc_set_mmss(struct device *dev, unsigned long secs)
+{
+   return ds1683_set_mmss(to_i2c_client(dev), secs);
+}
+
+static int ds1683_get_control(struct i2c_client *client, u8 *status)
+{
+   unsigned char addr = ds1683_REG_CONTROL;
+
+   struct i2c_msg msgs[] = {
+   {/* setup read pointer */
+   .addr = client->addr,
+   .len = 1,
+   .buf = &addr
+   },
+   {/* read control */
+   .addr = client->addr,
+   .flags = I2C_M_RD,
+   .len = 1,
+   .buf = status
+   },
+   };
+
+   /* read control register */
+   if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
+   dev_err(&cli

[rtc-linux] Need Hybris Developer at San Ramone, CA

2018-08-02 Thread venkat A
Hi ,

 

I hope this message finds you well today!

 

I do have the following role with our client if you are interested please go 
through the detailed job description and send me your updated resume with 
details requested below the job description.

 

If this is not right time let me know when can i check back with you so i will 
be in touch with you accordingly.

 

Position   : Hybris Developer

Location  : San Ramone, CA

Duration  : 6+ months

 

Job description:

 

Requested Qualifications:

 

5+ years Experience with Java/Spring MVC and web applications (HTML, REST, 
JavaScript) 

Knowledge of development lifecycle best practices including version control, 
QA, build/release management, hot folder 

Developments in PCM, WCMS, Search and Browse, Cart, Checkout, Order 
orchestration 

Experience in development of B2B and B2C Framework Cockpit and BackOffice 
Configuration 

Ability to test end to end development in Hybris Design and Configure Product 
Catalogue 

Familiar with the integration Hybris and SAP and other third party application 
via MULESOFT (nice to have MULESOFT experience)

 

Full Name: 

LinkedIn ID:

Contact: +

E-mail: 

Skype ID:  

Current Location: 

Relocation: 

Joining Availability: 

Interview availability: 

Last 4 digits SSN: 

DOB: 

Visa Status: 

 

 

 

Thanks & Regards

 

Venkat A

Sr. Recruiter 

a:  #450, 15 Corporate PI S


p:

732-399-9510  ext:114 

 

Piscataway , NJ , 08854

w:  www.intellyk.com <http://www.intellyk.com/>   e:   
<mailto:ven...@intellyk.com> ven...@intellyk.com 

 

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] Need Java Architect at Albany, NY

2018-08-02 Thread venkat A
Hi ,

 

I hope this message finds you well today!

 

I do have the following role with our client if you are interested please go 
through the detailed job description and send me your updated resume with 
details requested below the job description.

 

If this is not right time let me know when can i check back with you so i will 
be in touch with you accordingly.

 

Position   : Java Architect

Location  : Albany, NY

Duration  : 24 months

 

Job description:

 

Mandatory Qualification:

 

-Technical expert centered around a technology, technologies or a portfolio of 
applications

-Designing and implementing Information Technology solutions

 

Requested Qualifications:

1.  84 Months of experience in Object Oriented Analysis and Design (OOAD) 
in designing and implementing Information Technology Solutions using the Java 
programming language.
2.  48 Months of experience in Oracle PL/SQL and developing procedures and 
packages.
3.  36 Months of experience in using the Spring framework
4.  24 Months of experience in using the Struts framework
5.  24 Months of experience using JavaScript frameworks
6.  12 Months of experience building Responsive Web applications
7.  12 Months of experience developing Java Web Services (REST and SOAP)
8.  12 Months of experience building PowerBuilder applications
9.  12 Months of experience in using EJBs in enterprise applications

 

Full Name: 

LinkedIn ID:

Contact: +

E-mail: 

Skype ID:  

Current Location: 

Relocation: 

Joining Availability: 

Interview availability: 

Last 4 digits SSN: 

DOB: 

Visa Status: 

 

Professional References:

 

Name: 

LinkedIn ID: 

Title: 

Client name: 

Phone: 

Email ID:  

 

Name: 

LinkedIn ID: 

Title: 

Client name: 

Phone: 

Email ID:  

 

 

Thanks & Regards

 

Venkat A

Sr. Recruiter 

a:  #450, 15 Corporate PI S


p:

732-399-9510  ext:114 

 

Piscataway , NJ , 08854

w:  www.intellyk.com <http://www.intellyk.com/>   e:   
<mailto:ven...@intellyk.com> ven...@intellyk.com 

 

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[rtc-linux] RE:Azure IOT | Location: Dallas, TX | EXCEPT OPT AND CPT

2019-03-19 Thread venkat sai
*Hi ,*



*I am reaching out to check your availability for the below role. Please
review the job description and let me know if you are interested to submit
your resume.*



*Job Title: Azure IOT*

*Location: Dallas, TX*

*Duration: Contract*



*• Overall 7-12 years of experience in .Net programming,
ASP.NET , C#, MVC and 2 + years in Azure Cloud PaaS
Services*

*• Hands on development experience in Microsoft Azure Cloud
Services using Azure Storage, Azure IoT, Event Hub, Service Bus, Function,
API Gateway, Azure Active Directory (AD), Cosmos DB*

*• Good experience in developing, configuring, deploying
applications using Microsoft Azure Function/Cloud App/Service Fabric*

*• Experience in designing web application, REST APIs and
database schema*

*• Proficient understanding of code versioning tools {{such as
Git, SVN, and TFS}}*

*• Experience building and supporting an Agile DevOps
environment to manage and scale multiple software products*

*• Experience with micro services architecture and large scale
application development*

*• Practice implementing infrastructure deployment, and
configuration, as code, to deliver stable and repeatable environments*

*• Design & Development Skills - .Net, MVC, Web Services, Web
API's & Power shell scripting*

*• Good understanding of distributed & multi-tenant systems.*

*• Good Communication and client facing skills*

*• BTech/BE/MS/MCA Degree required with minimum 6 years of
experience*



*Responsibilities*

*• Design, develop, maintain and enhance web services and
applications using C# .Net on Azure Cloud*

*• Responsible for developing an overall IoT/ML and Cloud
ecosystem engagement strategy.*

*• Analyzing Client requirements; generate value-adds &
articulate its benefits to customers*

*• Build deep relationships with senior technical **individuals**
within customer organization to ideate IoT solution*

*• Identify bottlenecks and bugs, and devise solutions to these
problems*

*• Serve as an expert on applications and provide technical
support*



*Duties*

*• Work closely with product owners, designers, programmers,
and QA to deliver industry-leading solutions*

*• Translate application storyboards and use cases into
functional applications*

*• Review code from peers and provided feedback.*

*• Test and deploy applications and systems.*

*• Revise, update, refactor and debug code.*

*• Upgrade, configure and debug existing systems.*





[image:
https://docs.google.com/uc?export=download&id=0BzM_vPFfNW6zcFhJdzdqRHd0TVU&revid=0BzM_vPFfNW6zeGFLeE8xcExvb1g4ZXNBQ3lZZHAyd2dtclk4PQ]

*Thanks & Regards:*

*S.VENKATASAI*

*Sr. Sales Recruiter*

*RD TECH* *SYSTEMS Inc*

*E-mail : **v...@rdtechsystems.com* 

*G-Talk : venkat46654...@gmail.com *
*Direct: **: 1-732-837-2423  Alt no: 1- 3159791318 (24/7 available)*

*1720 Brook side Dr Prosper, TX 75078*

Donate Red || Save Blue || Spread Green

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [rtc-linux] Need Solutions Architect at Jamestown, NY

2020-04-28 Thread Venkat A
I have candidate h1 rate 115/hr on C2C

On Wed, Apr 29, 2020 at 2:39 AM Alex Jordan  wrote:

> Hi,
>
> Hope you are doing great,
>
> We have an immediate opportunity for Solutions Architect at Jamestown, NY.
> Below is the job description and if you’d like to pursue this, please
> include a word copy of your latest resume along with a daytime phone number
> and rate in your response.
>
>
>
> *Title: Solutions Architect*
>
> *Location: Jamestown, NY*
>
> *6 month(s)*
>
> *Phone Screen *
>
>
>
> *GC or USC only*
>
>
>
> *Primary Skills :*
>
> · Microservices
>
> · NoSQL and SQL
>
> · AngularJS and React
>
> · gRPC
>
> · All Web Services
>
> · Docker
>
> · Kanban
>
>
>
> *Nice to have: *
>
> · Experience with Angular, Typscript, React, NestJS, GraphQL,
> RabbitMQ, EventStore, NodeJSr
>
>
>
> Thanks and Regards,
>
>
>
> Alex Jordan
>
> New York Technology Partners – Rochester
>
> 1425 Jefferson Rd.
>
> Rochester, NY 14623
>
> Mobile: 859 429 3582
>
> T1: (201) 680-0200 x 7027
>
> Fax: (201) 474-8533
>
> 8 a...@nytpartners.com
>
> 8 www.nytp.com
>
> Gmail*: *syedstaffing
>
> [image: Description: Description: Description: Description: Description:
> Description: Description: Description: Description: Description:
> Description: Description: Description: 
> cid:image005.jpg@01D261DB.2E5B8E90][image:
> cid:image001.jpg@01D5E734.A1499F50][image:
> cid:image002.jpg@01D5E734.A1499F50]
>
> This email message and any files transmitted with it may contain
> confidential and proprietary data. It is intended solely for the use of the
> intended recipient, noted in the SMTP header. Unauthorized use of the data
> contained in this message is prohibited. If you have received this message
> in error, please reply to this message and delete the original material.
> Thank you for your cooperation.
>
>
>
> --
> You received this message because you are subscribed to "rtc-linux".
> Membership options at http://groups.google.com/group/rtc-linux .
> Please read http://groups.google.com/group/rtc-linux/web/checklist
> before submitting a driver.
> ---
> You received this message because you are subscribed to the Google Groups
> "rtc-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rtc-linux+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rtc-linux/04d201d61da1%243f063580%24bd12a080%24%40nytpartners.com
> 
> .
>

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rtc-linux/CAMUnsukYaydWZZMeonYX%2BO9-tF4ytvToL%2B06-Zh3y07qgSANxw%40mail.gmail.com.


Re: [rtc-linux] Hiring Lead Java Architect || Sunnyvale, CA

2020-04-29 Thread Venkat A
if it is 100% remote i have one H1b profile rate 100/hr
current location is GA

On Wed, Apr 29, 2020 at 6:42 PM Uday Varanganti <
uday.varanga...@performancesoftech.com> wrote:

> *Job Titles: Lead Java Architect*
>
> *Work Locations: Sunnyvale, CA 94085*
>
> *Duration: 06 Months*
>
> *Mode Of Interview: Telephonic Or Skype*
>
> *Visa Type: Any*
>
>
>
>
>
> *Job Details:Must Have Skills*ElasticSearch
> Java
> Spring
>
>
> *Nice to have skills*Mongo DB
> Kafka
>
>
> *Detailed Job Description*This is for a lead-level resource for Apple
> Talent Point and workday integration project involving server technologies
> such as Java, Spring, Mongo DB, Kafka, Elastic Search, etc and UI
> technologies such as Angular JS, Angular, react JS etc.
>
> Minimum years of experience
> 15+
>
> Thanks...
>
> Uday Varanganti
> Recruiting Specialist
> uday.varanga...@performancesoftech.com
> O: (785)380 8559
>
> --
> You received this message because you are subscribed to "rtc-linux".
> Membership options at http://groups.google.com/group/rtc-linux .
> Please read http://groups.google.com/group/rtc-linux/web/checklist
> before submitting a driver.
> ---
> You received this message because you are subscribed to the Google Groups
> "rtc-linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rtc-linux+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rtc-linux/CAEmiLYvwQ%2B4TcH5_a1O8V_LbPeNmca2vSLJbSSoG-H38MTbJPA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rtc-linux/CAMUnsu%3DobzSnB30mWb-wMc%2B3qvn1%3DNJXxP9XAQ6khwWEYr%3DqXg%40mail.gmail.com.


[rtc-linux] [PATCH] rtc: max77683: avoid regmap bulk write for max77620

2016-12-12 Thread Venkat Reddy Talla
Adding support to avoid regmap bulk write for the
devices which are not supported register bulk write.
Max77620 RTC device does not support register bulk write
so disabling regmap bulk write for max77620 rtc device
and enabling only for max77683.

Signed-off-by: Venkat Reddy Talla 
---
 drivers/rtc/rtc-max77686.c | 39 ++-
 1 file changed, 34 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 182fdd0..401ab25 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -84,6 +84,7 @@ struct max77686_rtc_driver_data {
int alarm_pending_status_reg;
/* RTC IRQ CHIP for regmap */
const struct regmap_irq_chip *rtc_irq_chip;
+   bool avoid_rtc_bulk_write;
 };
 
 struct max77686_rtc_info {
@@ -197,6 +198,7 @@ static const struct max77686_rtc_driver_data 
max77686_drv_data = {
.alarm_pending_status_reg = MAX77686_REG_STATUS2,
.rtc_i2c_addr = MAX77686_I2C_ADDR_RTC,
.rtc_irq_chip = &max77686_rtc_irq_chip,
+   .avoid_rtc_bulk_write = false,
 };
 
 static const struct max77686_rtc_driver_data max77620_drv_data = {
@@ -208,6 +210,7 @@ static const struct max77686_rtc_driver_data 
max77620_drv_data = {
.alarm_pending_status_reg = MAX77686_INVALID_REG,
.rtc_i2c_addr = MAX77620_I2C_ADDR_RTC,
.rtc_irq_chip = &max77686_rtc_irq_chip,
+   .avoid_rtc_bulk_write = true,
 };
 
 static const unsigned int max77802_map[REG_RTC_END] = {
@@ -259,6 +262,32 @@ static const struct max77686_rtc_driver_data 
max77802_drv_data = {
.rtc_irq_chip = &max77802_rtc_irq_chip,
 };
 
+static inline int _regmap_bulk_write(struct max77686_rtc_info *info,
+   unsigned int reg, void *val, int len)
+{
+   int ret = 0;
+
+   if (!info->drv_data->avoid_rtc_bulk_write) {
+   /* RTC registers support sequential writing */
+   ret = regmap_bulk_write(info->rtc_regmap, reg, val, len);
+   } else {
+   /* Power registers support register-data pair writing */
+   u8 *src = (u8 *)val;
+   int i;
+
+   for (i = 0; i < len; i++) {
+   ret = regmap_write(info->rtc_regmap, reg, *src++);
+   if (ret < 0)
+   break;
+   reg++;
+   }
+   }
+   if (ret < 0)
+   dev_err(info->dev, "%s() failed, e %d\n", __func__, ret);
+
+   return ret;
+}
+
 static void max77686_rtc_data_to_tm(u8 *data, struct rtc_time *tm,
struct max77686_rtc_info *info)
 {
@@ -383,7 +412,7 @@ static int max77686_rtc_set_time(struct device *dev, struct 
rtc_time *tm)
 
mutex_lock(&info->lock);
 
-   ret = regmap_bulk_write(info->rtc_regmap,
+   ret = _regmap_bulk_write(info,
info->drv_data->map[REG_RTC_SEC],
data, ARRAY_SIZE(data));
if (ret < 0) {
@@ -506,7 +535,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info 
*info)
for (i = 0; i < ARRAY_SIZE(data); i++)
data[i] &= ~ALARM_ENABLE_MASK;
 
-   ret = regmap_bulk_write(info->rtc_regmap, map[REG_ALARM1_SEC],
+   ret = _regmap_bulk_write(info, map[REG_ALARM1_SEC],
data, ARRAY_SIZE(data));
}
 
@@ -558,7 +587,7 @@ static int max77686_rtc_start_alarm(struct 
max77686_rtc_info *info)
if (data[RTC_DATE] & 0x1f)
data[RTC_DATE] |= (1 << ALARM_ENABLE_SHIFT);
 
-   ret = regmap_bulk_write(info->rtc_regmap, map[REG_ALARM1_SEC],
+   ret = _regmap_bulk_write(info, map[REG_ALARM1_SEC],
data, ARRAY_SIZE(data));
}
 
@@ -588,7 +617,7 @@ static int max77686_rtc_set_alarm(struct device *dev, 
struct rtc_wkalrm *alrm)
if (ret < 0)
goto out;
 
-   ret = regmap_bulk_write(info->rtc_regmap,
+   ret = _regmap_bulk_write(info,
info->drv_data->map[REG_ALARM1_SEC],
data, ARRAY_SIZE(data));
 
@@ -654,7 +683,7 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info 
*info)
 
info->rtc_24hr_mode = 1;
 
-   ret = regmap_bulk_write(info->rtc_regmap,
+   ret = _regmap_bulk_write(info,
info->drv_data->map[REG_RTC_CONTROLM],
data, ARRAY_SIZE(data));
if (ret < 0) {
-- 
2.1.4

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submittin

[rtc-linux] [PATCH] rtc: Add support for maxim dallas rtc max-6917

2016-10-12 Thread VENKAT PRASHANTH B U
This is a patch to add support for
maxim dallas rtc max6917.

Signed-off-by: Venkat Prashanth B U 
---
---
 drivers/rtc/Kconfig   |   9 +
 drivers/rtc/Makefile  |   1 +
 drivers/rtc/rtc-max6917.c | 406 ++
 3 files changed, 416 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e215f50..2163606 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -277,6 +277,15 @@ config RTC_DRV_MAX6900
  This driver can also be built as a module. If so, the module
  will be called rtc-max6900.
 
+config RTC_DRV_MAX6917
+   tristate "Maxim MAX6917"
+   help
+ If you say yes here you will get support for the
+ Maxim MAX6917 I2C RTC chip.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-max6917.
+
 config RTC_DRV_MAX8907
tristate "Maxim MAX8907"
depends on MFD_MAX8907
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7cf7ad5..29332fb 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -87,6 +87,7 @@ obj-$(CONFIG_RTC_DRV_M48T86)  += rtc-m48t86.o
 obj-$(CONFIG_RTC_DRV_MAX6900)  += rtc-max6900.o
 obj-$(CONFIG_RTC_DRV_MAX6902)  += rtc-max6902.o
 obj-$(CONFIG_RTC_DRV_MAX6916)  += rtc-max6916.o
+obj-$(CONFIG_RTC_DRV_MAX6917)  += rtc-max6917.o
 obj-$(CONFIG_RTC_DRV_MAX77686) += rtc-max77686.o
 obj-$(CONFIG_RTC_DRV_MAX8907)  += rtc-max8907.o
 obj-$(CONFIG_RTC_DRV_MAX8925)  += rtc-max8925.o
diff --git a/drivers/rtc/rtc-max6917.c b/drivers/rtc/rtc-max6917.c
index e69de29..1176384 100644
--- a/drivers/rtc/rtc-max6917.c
+++ b/drivers/rtc/rtc-max6917.c
@@ -0,0 +1,406 @@
+   /* rtc-max6917.c
+   *
+   * Driver for MAXIM  max6917  I2C-Compatible Real Time Clock
+   *
+   * Author : Venkat Prashanth B U 
+   *
+   * 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 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+
+   #define MAX6917_REG_SECS0x01/* 00-59 */
+   #define MAX6917_REG_MIN 0x02/* 00-59 */
+   #define MAX6917_REG_HOUR0x03/* 00-23, or 
1-12{am,pm} */
+   #define MAX6917_REG_WDAY0x04/* 01-07 */
+   #define MAX6917_REG_MDAY0x05/* 01-31 */
+   #define MAX6917_REG_MONTH   0x06/* 01-12 */
+   #define MAX6917_REG_YEAR0x07/* 00-99 */
+   #define MAX6917_REG_CONTROL 0x08
+   #define MAX6917_REG_STATUS  0x0c
+   #define MAX6917_REG_ALARM   0x0a
+   #define MAX6917_BURST_LEN   8   /* can burst r/w first 
8 regs */
+   #define MAX6917_REG_CENTURY 9   /* century */
+   #define MAX6917_REG_LEN 10
+   #define MAX6917_REG_CT_WP   (1 << 7)/* Write 
Protect */
+   /*
+   * register read/write commands
+   */
+   #define MAX6917_REG_CONTROL_WRITE   0x8e
+   #define MAX6917_REG_CENTURY_WRITE   0x92
+   #define MAX6917_REG_CENTURY_READ0x93
+   #define MAX6917_REG_RESERVED_READ   0x96
+   #define MAX6917_REG_BURST_WRITE 0xbe
+   #define MAX6917_REG_BURST_READ  0xbf
+
+   #define MAX6917_IDLE_TIME_AFTER_WRITE   3   /* specification says 
2.5 mS */
+
+   static struct i2c_driver max6917_driver;
+
+   struct max6917
+   {
+   u8 offset;  /* register's offset */
+   u8 regs[11];
+   u16 nvram_offset;
+   struct bin_attribute *nvram;
+   unsigned long flags;
+   #define HAS_NVRAM   0   /* bit 0 == sysfs file 
active */
+   #define HAS_ALARM   1   /* bit 1 == irq claimed 
*/
+   struct i2c_client *client;
+   struct rtc_device *rtc;
+   s32 (*read_block_data) (const struct i2c_client * client, u8 
command,
+   u8 length, u8 * values);
+   s32 (*write_block_data) (const struct i2c_client * client, u8 
command,
+   u8 length, const u8 * values);
+   };
+
+   struct chip_desc
+   {
+   unsigned alarm:1;
+   u16 nvram_offset;
+   u16 nvram_size;
+   };
+
+   static int
+   max6917_i2c_read_regs (struct i2c_client *client, u8 * buf)
+   {
+   u8 reg_burst_read[1] = { MAX6917_REG_BURST_READ };
+   u8 reg_century_read[1] = { MAX6917_REG_CENTURY_READ };
+   struct i2c_msg msgs[4] = {
+   {
+   .addr = client->addr,
+   .flags = 0,   

[rtc-linux] [PATCH] rtc: add support for rtc NXP pca21125

2016-10-18 Thread VENKAT PRASHANTH B U
This is the patch to add support for
NXP rtc pca21125

Signed-off-by: Venkat Prashanth B U 
---
---
 drivers/rtc/Kconfig|  12 
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-pca21125.c | 164 +
 3 files changed, 177 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e215f50..df10e0e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -686,6 +686,18 @@ config RTC_DRV_MAX6916
  This driver can also be built as a module. If so, the module
  will be called rtc-max6916.
 
+config RTC_DRV_PCA21125
+   tristate "NXP PCA21125"
+   help
+ If you say yes here you will get support for the
+ NXP PCA21125 SPI RTC chip.
+
+ This driver only supports the RTC feature, and not other chip
+ features such as alarms.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-pca21125.
+
 config RTC_DRV_R9701
tristate "Epson RTC-9701JE"
help
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7cf7ad5..2c6af37 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -105,6 +105,7 @@ obj-$(CONFIG_RTC_DRV_NUC900)+= rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
 obj-$(CONFIG_RTC_DRV_PALMAS)   += rtc-palmas.o
+obj-$(CONFIG_RTC_DRV_PCA21125) += rtc-pca21125.o
 obj-$(CONFIG_RTC_DRV_PCAP) += rtc-pcap.o
 obj-$(CONFIG_RTC_DRV_PCF2123)  += rtc-pcf2123.o
 obj-$(CONFIG_RTC_DRV_PCF2127)  += rtc-pcf2127.o
diff --git a/drivers/rtc/rtc-pca21125.c b/drivers/rtc/rtc-pca21125.c
index e69de29..8d42e4e 100644
--- a/drivers/rtc/rtc-pca21125.c
+++ b/drivers/rtc/rtc-pca21125.c
@@ -0,0 +1,164 @@
+   /* rtc-pca21125.c
+   *
+   * Driver for NXP  PCA21125 CMOS, SPI Compatible
+   * Real Time Clock
+   *
+   * Author : Venkat Prashanth B U 
+   *
+   * 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 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   
+   /* Registers in pca21125 rtc */
+   
+   #define PCA21125_SECONDS_REG0x02
+   #define PCA21125_MINUTES_REG0x03
+   #define PCA21125_HOURS_REG  0x04
+   #define PCA21125_DATE_REG   0x05
+   #define PCA21125_DAY_REG0x06
+   #define PCA21125_MONTH_REG  0x07
+   #define PCA21125_YEAR_REG   0x08
+   #define PCA21125_CONTROL_REG0x01
+   #define PCA21125_STATUS_REG 0x00
+   #define PCA21125_CLOCK_BURST0x0D
+   
+   static int pca21125_read_reg(struct device *dev, unsigned char address,
+   unsigned char *data)
+   {
+   struct spi_device *spi = to_spi_device(dev);
+   
+   *data = address | 0x80;
+   
+   return spi_write_then_read(spi, data, 1, data, 1);
+   }
+   
+   static int pca21125_write_reg(struct device *dev, unsigned char address,
+   unsigned char data)
+   {
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[2];
+   
+   buf[0] = address & 0x7F;
+   buf[1] = data;
+   
+   return spi_write_then_read(spi, buf, 2, NULL, 0);
+   }
+   
+   static int pca21125_read_time(struct device *dev, struct rtc_time *dt)
+   {
+   struct spi_device *spi = to_spi_device(dev);
+   int err;
+   unsigned char buf[8];
+   
+   buf[0] = PCA21125_CLOCK_BURST | 0x80;
+   
+   err = spi_write_then_read(spi, buf, 1, buf, 8);
+   
+   if (err)
+   return err;
+   
+   dt->tm_sec = bcd2bin(buf[0]);
+   dt->tm_min = bcd2bin(buf[1]);
+   dt->tm_hour = bcd2bin(buf[2] & 0x3F);
+   dt->tm_mday = bcd2bin(buf[3]);
+   dt->tm_mon = bcd2bin(buf[4]) - 1;
+   dt->tm_wday = bcd2bin(buf[5]) - 1;
+   dt->tm_year = bcd2bin(buf[6]) + 100;
+   
+   return rtc_valid_tm(dt);
+   }
+   
+   static int pca21125_set_time(struct device *dev, struct rtc_time *dt)
+   {
+   struct spi_device *spi = to_spi_device(dev);
+   unsigned char buf[9];
+   
+   if (dt->tm_year < 100 || dt->tm_year > 199) {
+   dev_err(&spi->dev, "Year must be between 2000 and 2099. 
It's %d.\n",
+   dt->tm_year + 1900);
+   

[rtc-linux] [PATCH v2] rtc: add support for rtc NXP pca21125

2016-10-19 Thread VENKAT PRASHANTH B U
This is a patch to add support for
NXP rtc pca21125

Signed-off-by: Venkat Prashanth B U 
---
changelog v2:
1. used the registers defined in pca21125_set_time function
2. code cleanup in the function pca21125_read_time function
3. Write the address on the bus with pca21125_write_reg function
4. code clean up on pca21125_probe function
5. Add the alarm feature support feature in the driver code
6. fixed the indentation of entire file
---
---
 drivers/rtc/Kconfig|   9 ++
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-pca21125.c | 234 +
 3 files changed, 244 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e215f50..29f40cb 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -739,6 +739,15 @@ config RTC_DRV_PCF2123
  This driver can also be built as a module. If so, the module
  will be called rtc-pcf2123.
 
+config RTC_DRV_PCA21125
+   tristate "NXP PCA21125"
+   help
+ If you say yes here you get support for the NXP PCA21125
+ RTC chip.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-pca21125.
+
 config RTC_DRV_MCP795
tristate "Microchip MCP795"
help
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7cf7ad5..41a5807 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_OMAP)  += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
 obj-$(CONFIG_RTC_DRV_PALMAS)   += rtc-palmas.o
 obj-$(CONFIG_RTC_DRV_PCAP) += rtc-pcap.o
+obj-$(CONFIG_RTC_DRV_PCA21125) += rtc-pca21125.o
 obj-$(CONFIG_RTC_DRV_PCF2123)  += rtc-pcf2123.o
 obj-$(CONFIG_RTC_DRV_PCF2127)  += rtc-pcf2127.o
 obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o
diff --git a/drivers/rtc/rtc-pca21125.c b/drivers/rtc/rtc-pca21125.c
index e69de29..536cf50 100644
--- a/drivers/rtc/rtc-pca21125.c
+++ b/drivers/rtc/rtc-pca21125.c
@@ -0,0 +1,234 @@
+   /* rtc-pca21125.c
+   *
+   * Driver for NXP  PCA21125 CMOS, SPI Compatible
+   * Real Time Clock
+   *
+   * Author : Venkat Prashanth B U 
+   *
+   * 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 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+
+   /* Registers in pca21125 rtc */
+   #define PCA21125_SECONDS_REG0x02
+   #define PCA21125_MINUTES_REG0x03
+   #define PCA21125_HOURS_REG  0x04
+   #define PCA21125_DATE_REG   0x05
+   #define PCA21125_DAY_REG0x06
+   #define PCA21125_MONTH_REG  0x07
+   #define PCA21125_YEAR_REG   0x08
+   #define PCA21125_CONTROL_REG0x01
+   #define PCA21125_STATUS_REG 0x00
+   #define PCA21125_CLOCK_BURST0x0D
+
+   struct pca21125_priv {
+
+   struct spi_device *spi;
+   struct rtc_device *rtc;
+   struct regmap *map;
+   struct mutex mutex;
+   unsigned int irqen;
+   int irq;
+   int alarm_sec;
+   int alarm_min;
+   int alarm_hour;
+   int alarm_mday;
+   };
+
+   static int
+   pca21125_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
+   {
+   struct pca21125_priv *priv = dev_get_drvdata(dev);
+   int res = 0;
+   unsigned int stat;
+
+   if (priv->irq <= 0)
+   return -EINVAL;
+
+   mutex_lock(&priv->mutex);
+
+   res = regmap_read(priv->map, PCA21125_STATUS_REG, &stat);
+   if (res)
+   goto out;
+
+   alarm->enabled = !!(priv->irqen & RTC_AF);
+
+   alarm->time.tm_sec = priv->alarm_sec < 0 ? 0 : priv->alarm_sec;
+   alarm->time.tm_min = priv->alarm_min < 0 ? 0 : priv->alarm_min;
+   alarm->time.tm_hour = priv->alarm_hour < 0 ? 0 : priv->alarm_hour;
+   alarm->time.tm_mday = priv->alarm_mday < 0 ? 0 : priv->alarm_mday;
+
+out:
+   mutex_unlock(&priv->mutex);
+   return res;
+   }
+
+   static int
+   pca21125_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
+   {
+   struct pca21125_priv *priv = dev_get_drvdata(dev);
+   int res = 0;
+
+   if (priv->irq <= 0)
+   return -EINVAL;
+
+   mutex_lock(&priv->mutex);
+
+   priv->alarm_sec = alarm->time.tm_sec;
+   priv->alarm_min = alarm->time.tm_min;
+   priv->alarm_hour = alarm->time.tm_hour;
+   priv->alarm_mday = alarm->time.tm_mday;
+
+   if (alarm->enabled)
+   priv->irqen |= RTC_AF;
+
+   

[rtc-linux] [PATCH] rtc: add support for rtc NXP pca8565

2016-10-30 Thread VENKAT PRASHANTH B U
This is a patch to add support for
NXP rtc pca8565

Signed-off-by: Venkat Prashanth B U 
---
---
 drivers/rtc/Kconfig   |   9 ++
 drivers/rtc/Makefile  |   1 +
 drivers/rtc/rtc-pca8565.c | 221 ++
 3 files changed, 231 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e215f50..f28b569 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -392,6 +392,15 @@ config RTC_DRV_PCF8523
  This driver can also be built as a module. If so, the module
  will be called rtc-pcf8523.
 
+config RTC_DRV_PCA8565
+   tristate "NXP PCA8565"
+   help
+ If you say yes here you get support for the NXP PCA8565 RTC
+ chips.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-pca8565.
+
 config RTC_DRV_PCF85063
tristate "NXP PCF85063"
help
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7cf7ad5..ec709a4 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_OMAP)  += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
 obj-$(CONFIG_RTC_DRV_PALMAS)   += rtc-palmas.o
 obj-$(CONFIG_RTC_DRV_PCAP) += rtc-pcap.o
+obj-$(CONFIG_RTC_DRV_PCA8565)  += rtc-pca8565.o
 obj-$(CONFIG_RTC_DRV_PCF2123)  += rtc-pcf2123.o
 obj-$(CONFIG_RTC_DRV_PCF2127)  += rtc-pcf2127.o
 obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o
diff --git a/drivers/rtc/rtc-pca8565.c b/drivers/rtc/rtc-pca8565.c
index e69de29..ec678ee 100644
--- a/drivers/rtc/rtc-pca8565.c
+++ b/drivers/rtc/rtc-pca8565.c
@@ -0,0 +1,221 @@
+/*
+ * An I2C driver for the PCA8565 RTC
+ *
+ * Author: Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+#include 
+
+#define PCA8565_REG_CTRL1  0x00 /* status */
+#define PCA8565_REG_CTRL1_STOP BIT(5)
+#define PCA8565_REG_CTRL2  0x01
+#define PCA8565_REG_SC 0x02 /* datetime */
+#define PCA8565_REG_SC_OS  0x80
+#define PCA8565_REG_MN 0x03
+#define PCA8565_REG_HR 0x04
+#define PCA8565_REG_DM 0x05
+#define PCA8565_REG_DW 0x06
+#define PCA8565_REG_MO 0x07
+#define PCA8565_REG_YR 0x08
+
+static struct i2c_driver pca8565_driver;
+
+static int pca8565_stop_clock(struct i2c_client *client, u8 *ctrl1)
+{
+   s32 ret;
+
+   ret = i2c_smbus_read_byte_data(client, PCA8565_REG_CTRL1);
+   if (ret < 0) {
+   dev_err(&client->dev, "Failing to stop the clock\n");
+   return -EIO;
+   }
+
+   /* stop the clock */
+   ret |= PCA8565_REG_CTRL1_STOP;
+
+   ret = i2c_smbus_write_byte_data(client, PCA8565_REG_CTRL1, ret);
+   if (ret < 0) {
+   dev_err(&client->dev, "Failing to stop the clock\n");
+   return -EIO;
+   }
+
+   *ctrl1 = ret;
+
+   return 0;
+}
+
+static int pca8565_start_clock(struct i2c_client *client, u8 ctrl1)
+{
+   s32 ret;
+
+   /* start the clock */
+   ctrl1 &= PCA8565_REG_CTRL1_STOP;
+
+   ret = i2c_smbus_write_byte_data(client, PCA8565_REG_CTRL1, ctrl1);
+   if (ret < 0) {
+   dev_err(&client->dev, "Failing to start the clock\n");
+   return -EIO;
+   }
+
+   return 0;
+}
+
+static int pca8565_get_datetime(struct i2c_client *client, struct rtc_time *tm)
+{
+   int rc;
+   u8 regs[7];
+
+   /*
+* while reading, the time/date registers are blocked and not updated
+* anymore until the access is finished. To not lose a second
+* event, the access must be finished within one second. So, read all
+* time/date registers in one turn.
+*/
+   rc = i2c_smbus_read_i2c_block_data(client, PCA8565_REG_SC,
+  sizeof(regs), regs);
+   if (rc != sizeof(regs)) {
+   dev_err(&client->dev, "date/time register read error\n");
+   return -EIO;
+   }
+
+   /* if the clock has lost its power it makes no sense to use its time */
+   if (regs[0] & PCA8565_REG_SC_OS) {
+   dev_warn(&client->dev, "Power loss detected, invalid time\n");
+   return -EINVAL;
+   }
+
+   tm->tm_sec = bcd2bin(regs[0] & 0x7F);
+   tm->tm_min = bcd2bin(regs[1] & 0x7F);
+   tm->tm_hour = bcd2bin(regs[2] & 0x3F); /* rtc hr 0-23 */
+   tm->tm_mday = bcd2bin(regs[3] & 0x3F);
+   tm->tm_wday = regs[4] & 0x07;
+   tm->tm_mon = bcd2bin(regs[5] & 0x1F) - 1; /* rtc mn 1-12 */
+   tm->tm_year = bcd2bin(regs[6]);

[rtc-linux] [PATCH] rtc: add support for maxim dallas ds1682

2016-12-24 Thread Venkat Prashanth B U
This is a patch to add support for
maxim dallas ds1682 total elapsed time recorder

Signed‐off‐by: Venkat Prashanth B U 
---
---
 drivers/rtc/Kconfig  |   9 ++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-ds1682.c | 288 +++
 3 files changed, 298 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e859d14..bcab91f 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -275,6 +275,15 @@ config RTC_DRV_DS1672
  This driver can also be built as a module. If so, the module
  will be called rtc-ds1672.
 
+config RTC_DRV_DS1682
+   tristate "Dallas/Maxim DS1682"
+   help
+ If you say yes here you get support for the
+ Dallas/Maxim DS1682 total elapsed time recorder.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-ds1682.
+
 config RTC_DRV_HYM8563
tristate "Haoyu Microelectronics HYM8563"
depends on OF
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 1ac694a..70bb28c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -58,6 +58,7 @@ obj-$(CONFIG_RTC_DRV_DS1390)  += rtc-ds1390.o
 obj-$(CONFIG_RTC_DRV_DS1511)   += rtc-ds1511.o
 obj-$(CONFIG_RTC_DRV_DS1553)   += rtc-ds1553.o
 obj-$(CONFIG_RTC_DRV_DS1672)   += rtc-ds1672.o
+obj-$(CONFIG_RTC_DRV_DS1682)   += rtc-ds1682.o
 obj-$(CONFIG_RTC_DRV_DS1685_FAMILY)+= rtc-ds1685.o
 obj-$(CONFIG_RTC_DRV_DS1742)   += rtc-ds1742.o
 obj-$(CONFIG_RTC_DRV_DS2404)   += rtc-ds2404.o
diff --git a/drivers/rtc/rtc-ds1682.c b/drivers/rtc/rtc-ds1682.c
index e69de29..fad440e 100644
--- a/drivers/rtc/rtc-ds1682.c
+++ b/drivers/rtc/rtc-ds1682.c
@@ -0,0 +1,288 @@
+/* Driver for Dallas Semiconductor DS1682 2 wire total elapsed
+ * time recorder
+ *
+ * Author : Venkat Prashanth B U 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#define DS1682_READ_MEMORY_CMD 0x1D
+
+#ifndef __LINUX_DS1682_H
+#define __LINUX_DS1682_H
+
+const struct ds1682_platform_data {
+
+
+   unsigned int gpio_rst;
+   unsigned int gpio_clk;
+   unsigned int gpio_dq;
+};
+#endif
+
+const struct ds1682;
+
+const struct ds1682_chip_ops {
+   int (*map_io)(const struct ds1682 *chip, struct platform_device *pdev,
+ const struct ds1682_platform_data *pdata);
+   void (*unmap_io)(const struct ds1682 *chip);
+};
+
+#define DS1682_RST 0
+#define DS1682_CLK 1
+#define DS1682_DQ  2
+
+const struct ds1682_gpio {
+   const char *name;
+   unsigned int gpio;
+};
+
+const struct ds1682 {
+   const struct ds1682_gpio *gpio;
+   const struct ds1682_chip_ops *ops;
+   const struct rtc_device *rtc;
+};
+
+const struct ds1682_gpio ds1682_gpio[] = {
+   { "RTC RST", 0 },
+   { "RTC CLK", 0 },
+   { "RTC DQ", 0 },
+};
+
+int ds1682_gpio_map(const struct ds1682 *chip, struct platform_device *pdev,
+ const struct ds1682_platform_data *pdata)
+{
+   int i, err;
+
+   ds1682_gpio[DS1682_RST].gpio = pdata->gpio_rst;
+   ds1682_gpio[DS1682_CLK].gpio = pdata->gpio_clk;
+   ds1682_gpio[DS1682_DQ].gpio = pdata->gpio_dq;
+
+   for (i = 0; i < ARRAY_SIZE(ds1682_gpio); i++) {
+   err = gpio_request(ds1682_gpio[i].gpio, ds1682_gpio[i].name);
+   if (err) {
+   dev_err(&pdev->dev, "error mapping gpio %s: %d\n",
+   ds1682_gpio[i].name, err);
+   goto err_request;
+   }
+   if (i != DS1682_DQ)
+   gpio_direction_output(ds1682_gpio[i].gpio, 1);
+   }
+
+   chip->gpio = ds1682_gpio;
+   return 0;
+
+err_request:
+   while (--i >= 0)
+   gpio_free(ds1682_gpio[i].gpio);
+   return err;
+}
+
+static void ds1682_gpio_unmap(const struct ds1682 *chip)
+{
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(ds1682_gpio); i++)
+   gpio_free(ds1682_gpio[i].gpio);
+}
+
+static const struct ds1682_chip_ops ds1682_gpio_ops = {
+   .map_io = ds1682_gpio_map,
+   .unmap_io   = ds1682_gpio_unmap,
+};
+
+static void ds1682_reset(const struct device *dev)
+{
+   gpio_set_value(ds1682_gpio[DS1682_RST].gpio, 0);
+   udelay(1000);
+   gpio_set_value(ds1682_gpio[DS1682_RST].gpio, 1);
+   gpio_set_value(ds1682_gpio[DS1682_CLK].gpio, 0);
+   gpio_direction_output(ds1682_gpio[DS1682_DQ].gpio, 0);
+   udelay(10);
+}
+
+static void ds1682_write_byte(const struct device *dev, u8 byte)
+{
+   int i;
+
+   gpio_direction_output(ds1682_gpio[DS1682_DQ].gpio, 1);
+   fo

[rtc-linux] [PATCH] rtc: add support for rtc NXP pca21125 and pca8565

2016-12-24 Thread Venkat Prashanth B U
This is a patch to support the SPI compatible PCA21125 device
with the I2C based rtc-pcf8563 driver using regmap layer.
Further this patch adds "pca8565" to the set of i2c ids.

Signed-off-by: Venkat Prashanth B U 
---
change log v3:
1. Add a regmap layer to I2C PCF8563 to support SPI PCA21125.
2. Add pca8565 to the set of i2c ids of rtc-pcf8563.
---
---
 drivers/rtc/rtc-pcf8563.c | 82 +++
 1 file changed, 82 insertions(+)

diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 1227cea..26c8b9b 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -22,6 +22,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #define PCF8563_REG_ST10x00 /* status */
 #define PCF8563_REG_ST20x01
@@ -59,6 +61,7 @@
 
 #define PCF8563_SC_LV  0x80 /* low voltage */
 #define PCF8563_MO_C   0x80 /* century */
+#define PCF8563_REG_SR 0x01 /*control-status register*/
 
 static struct i2c_driver pcf8563_driver;
 
@@ -84,6 +87,9 @@ struct pcf8563 {
struct i2c_client *client;
 #ifdef CONFIG_COMMON_CLK
struct clk_hw   clkout_hw;
+const  struct device *dev;
+const  struct regmap *regmap;
+   bool suspended;
 #endif
 };
 
@@ -629,6 +635,7 @@ static int pcf8563_probe(struct i2c_client *client,
 static const struct i2c_device_id pcf8563_id[] = {
{ "pcf8563", 0 },
{ "rtc8564", 0 },
+   { "pca8565", 0 },
{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcf8563_id);
@@ -636,11 +643,86 @@ MODULE_DEVICE_TABLE(i2c, pcf8563_id);
 #ifdef CONFIG_OF
 static const struct of_device_id pcf8563_of_match[] = {
{ .compatible = "nxp,pcf8563" },
+   { .compatible = "nxp,pca8565" },
{}
 };
 MODULE_DEVICE_TABLE(of, pcf8563_of_match);
 #endif
 
+#if IS_ENABLED(CONFIG_SPI_MASTER)
+
+static int pca21125_probe(const struct spi_device *spi)
+{
+   int res;
+   unsigned int tmp;
+   static const struct regmap_config config = {
+   .reg_bits = 8,
+   .val_bits = 8,
+   .write_flag_mask = 0x80,
+   };
+const struct regmap *regmap;
+const struct pcf8563 *pcf8563;
+
+   regmap = devm_regmap_init_spi(spi, &config);
+
+   if (IS_ERR(regmap)) {
+   dev_err(&spi->dev, "%s: regmap allocation 
failed: %ld\n",
+   __func__, PTR_ERR(regmap));
+   return PTR_ERR(regmap);
+   }
+
+   spi->mode = SPI_MODE_3;
+   spi->bits_per_word = 8;
+   spi_setup(spi);
+
+   res = regmap_read(regmap, PCF8563_REG_SC, &tmp);
+
+   if (res)
+   return res;
+   res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
+
+   if (res)
+   return res;
+
+   res = regmap_write(regmap, PCF8563_REG_CLKO, tmp & 0x1c);
+
+   if (res)
+   return res;
+
+   res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
+
+   if (res)
+   return res;
+
+   res = regmap_write(regmap, PCF8563_REG_SR, tmp & 0x88);
+
+   if (res)
+   return res;
+
+   /* Print our settings */
+   res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
+
+   if (res)
+   return res;
+
+   dev_info(&spi->dev, "Control Reg: 0x%02x\n", tmp);
+   res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
+
+   if (res)
+   return res;
+
+   dev_info(&spi->dev, "Ctrl/Stat Reg: 0x%02x\n", tmp);
+
+   pcf8563->rtc = devm_rtc_device_register(&spi->dev,
+   "pcf8563",
+   &pcf8563_rtc_ops, THIS_MODULE);
+}
+
+const struct spi_driver pca21125_driver = {
+   .driver = {
+   .name= "pca21125",
+   },
+
 static struct i2c_driver pcf8563_driver = {
.driver = {
.name   = "rtc-pcf8563",
-- 
1.9.2

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rtc-linux+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.