Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32467909rwd; Fri, 7 Jul 2023 14:40:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3ISVrO6oU9RiNPrQZ0NB6hCvcB9h0ZIVCFKVdpYpn+i+gZ6CPxeJ75YJ9U/eFPVnke43x X-Received: by 2002:a50:ff13:0:b0:51e:c61:1cd6 with SMTP id a19-20020a50ff13000000b0051e0c611cd6mr4377071edu.35.1688766041853; Fri, 07 Jul 2023 14:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688766041; cv=none; d=google.com; s=arc-20160816; b=qsXbC6t2w9iD7RomjPALcVBcelCxFMrQu9mOMo26rMijMsV9LuzzNsQq0c7KzGbN03 NocjdSR/5J7UWbi7tcqqENLFdmi1WVvzRCfDOSAdNj8NTeeoVo4vrt/LEFpHuaY0dngg o5WKwmMhKvde+InhsLTOYwnbt1+8uT4ZFRk3lBi79tJnec5cY2edjCBdex3RRdBNYRjW LjmEV8VEg73jp+B+C4LHj7DTbyeRPpmdXSdbGtoJLp1DXDL42Ae1lOhvoprZpi5wJS9L 7KLGEsIrXxkO1JIDQDVPrpyzRITbr0mZleiM+JIqGlkGfNCiBafDuA9oexk3tyhCHFfa Z+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=o55RwUJuXKY3r9gG6aD9I7YM7CsRDP5cAsKlf5uWgUk=; fh=vOP4lHUj6TXs/0PbxCzqO70oRahqeSUm4kqz+uQ3mHs=; b=PaqLJS3sXoFVaYEOTXurAr2AsqXBQVk66djFZ22sWESQqJZcdqEOElbfkHig1yI8fl eL2+Ea5JqIP4Vg18Nbad6ugBCa4oah0jD8jrpbb6DdaPNRrkl6cGqcHXF1PNKOBwx4tC +2f2H5KmdqGnQ/bY2voJnIs2iKoC4w5zA+EO7JUnH44/c16SE5Jhg3v9jPpV2Ij844+w a7gmKYvP/NWi/rDG3+hr7WlZBRSpu4w2WDURQDC8RwoGVL9ptF9AxPHWqPb0W74+yRcz WQwXjopyZDPGrXYuYYwtrO0veGBZxO5gRAKp+00lYNpfqvaWFqbHCQr6nCARJm2OZZYr yJbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=B085CBQv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a056402050c00b0051de4956270si2822862edv.231.2023.07.07.14.40.17; Fri, 07 Jul 2023 14:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=B085CBQv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbjGGVP7 (ORCPT + 99 others); Fri, 7 Jul 2023 17:15:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjGGVP5 (ORCPT ); Fri, 7 Jul 2023 17:15:57 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 419D4E5; Fri, 7 Jul 2023 14:15:56 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1b055511f8bso1465564fac.1; Fri, 07 Jul 2023 14:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688764555; x=1691356555; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=o55RwUJuXKY3r9gG6aD9I7YM7CsRDP5cAsKlf5uWgUk=; b=B085CBQvPW70+NDYenuenUfdMqMNhFc3riflGkKV4uO3kpzcIVyn8Sr11t2NIZPW2f r8Wfowghw66LmqMPvpgWxSm/GTxz2/7sgKK+r22LYV5ANQiqCyfJQatvU1HkC6bXnMwd Pv5kYbqEjLO2qxzbYrzQUH1fIxzPT0Hi4lGHxolOKr+lyZIqOC+LN08AB6OJMqxkUDJC lYv2PbZfSBomoUB54i5nvJPZ6fHB8cOPe1k9zaBcr0QZrnxN2fzAkrYMsRp85MClth/o 4oKqfh7rejDOhcg8ZuSzjBNgmllcB6250A9rOGepwNlsCuiCgRAc5Jg0WnxqfKsFGI2T G3zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688764555; x=1691356555; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o55RwUJuXKY3r9gG6aD9I7YM7CsRDP5cAsKlf5uWgUk=; b=LNmGiIgYQiXv/X0O2qM1fmN0ierq4SVYvdXFM9akuxoUnZAbwtbcoiEkwfqyUlYrX6 0Rw2Y6akAr2nyqhc+RXQPwEnnpKNr478NQVP1jUuFkw8FbhUBgj6RBdULdVGJjYscxPR I13kIlHj7oYDZ/72Ee0GZsBC9EqllGAYOFT2Lu1KhA+EfByQh42nGD5PQfr/50FtID9e PMXhqr8r6zrCJWAajvazAGmTqFJML/tGRybfU2b1RM9oeOMvsA6dwsHbB1wvwlEBqGMh viBz2gpWLfP3pEpjBtNxrAKhY6Um52Sopev7kHjM4Ld6wpRT/gI1VxJrAxOrx0ZArHjf 8JuA== X-Gm-Message-State: ABy/qLbnyBQQ+QX8x2SZblUxTKAUHpIX7i+y6LV54/afVMSijUdFAHeb fIJnPkhHS6RhHSbAugiADXYY5YjI+J8maA== X-Received: by 2002:a05:6870:2054:b0:1b0:2a6b:edf2 with SMTP id l20-20020a056870205400b001b02a6bedf2mr5110225oad.4.1688764555442; Fri, 07 Jul 2023 14:15:55 -0700 (PDT) Received: from madhu-kernel (99-145-207-128.lightspeed.austtx.sbcglobal.net. [99.145.207.128]) by smtp.gmail.com with ESMTPSA id di22-20020a0568303a1600b006b58616daa1sm2053188otb.2.2023.07.07.14.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 14:15:55 -0700 (PDT) Date: Fri, 7 Jul 2023 16:15:53 -0500 From: Madhumitha Prabakaran To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Greg Kroah-Hartman , Madhumitha Prabakaran , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-staging@lists.linux.dev Cc: skhan@linuxfoundation.org, ivan.orlov0322@gmail.com Subject: [PATCH] Add struct ad9832_platform_data to the include/linux/iio Message-ID: <20230707211553.GA110890@madhu-kernel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add struct ad9832_platform_data to the include/linux/iio for maintaining code organization and clarity. Signed-off-by: Madhumitha Prabakaran --- drivers/staging/iio/frequency/ad9832.c | 3 +-- drivers/staging/iio/frequency/ad9832.h | 34 -------------------------- include/linux/iio/frequency/ad9832.h | 30 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 36 deletions(-) delete mode 100644 drivers/staging/iio/frequency/ad9832.h create mode 100644 include/linux/iio/frequency/ad9832.h diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index 6f9eebd6c7ee..675adfb07b5d 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -19,8 +19,7 @@ #include #include - -#include "ad9832.h" +#include #include "dds.h" diff --git a/drivers/staging/iio/frequency/ad9832.h b/drivers/staging/iio/frequency/ad9832.h deleted file mode 100644 index 98dfbd9289ab..000000000000 --- a/drivers/staging/iio/frequency/ad9832.h +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * AD9832 SPI DDS driver - * - * Copyright 2011 Analog Devices Inc. - */ -#ifndef IIO_DDS_AD9832_H_ -#define IIO_DDS_AD9832_H_ - -/* - * TODO: struct ad9832_platform_data needs to go into include/linux/iio - */ - -/** - * struct ad9832_platform_data - platform specific information - * @mclk: master clock in Hz - * @freq0: power up freq0 tuning word in Hz - * @freq1: power up freq1 tuning word in Hz - * @phase0: power up phase0 value [0..4095] correlates with 0..2PI - * @phase1: power up phase1 value [0..4095] correlates with 0..2PI - * @phase2: power up phase2 value [0..4095] correlates with 0..2PI - * @phase3: power up phase3 value [0..4095] correlates with 0..2PI - */ - -struct ad9832_platform_data { - unsigned long freq0; - unsigned long freq1; - unsigned short phase0; - unsigned short phase1; - unsigned short phase2; - unsigned short phase3; -}; - -#endif /* IIO_DDS_AD9832_H_ */ diff --git a/include/linux/iio/frequency/ad9832.h b/include/linux/iio/frequency/ad9832.h new file mode 100644 index 000000000000..517d954636db --- /dev/null +++ b/include/linux/iio/frequency/ad9832.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * AD9832 SPI DDS driver + * + * Copyright 2011 Analog Devices Inc. + */ +#ifndef IIO_DDS_AD9832_H_ +#define IIO_DDS_AD9832_H_ + +/** + * struct ad9832_platform_data - platform specific information + * @mclk: master clock in Hz + * @freq0: power up freq0 tuning word in Hz + * @freq1: power up freq1 tuning word in Hz + * @phase0: power up phase0 value [0..4095] correlates with 0..2PI + * @phase1: power up phase1 value [0..4095] correlates with 0..2PI + * @phase2: power up phase2 value [0..4095] correlates with 0..2PI + * @phase3: power up phase3 value [0..4095] correlates with 0..2PI + */ +struct ad9832_platform_data { + unsigned long freq0; + unsigned long freq1; + unsigned short phase0; + unsigned short phase1; + unsigned short phase2; + unsigned short phase3; +}; + +#endif /* IIO_DDS_AD9832_H_ */ + -- 2.25.1