14667Smh27603 /* 24667Smh27603 * CDDL HEADER START 34667Smh27603 * 44667Smh27603 * The contents of this file are subject to the terms of the 54667Smh27603 * Common Development and Distribution License (the "License"). 64667Smh27603 * You may not use this file except in compliance with the License. 74667Smh27603 * 84667Smh27603 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 94667Smh27603 * or http://www.opensolaris.org/os/licensing. 104667Smh27603 * See the License for the specific language governing permissions 114667Smh27603 * and limitations under the License. 124667Smh27603 * 134667Smh27603 * When distributing Covered Code, include this CDDL HEADER in each 144667Smh27603 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 154667Smh27603 * If applicable, add the following below this CDDL HEADER, with the 164667Smh27603 * fields enclosed by brackets "[]" replaced with your own identifying 174667Smh27603 * information: Portions Copyright [yyyy] [name of copyright owner] 184667Smh27603 * 194667Smh27603 * CDDL HEADER END 204667Smh27603 */ 214667Smh27603 /* 22*6464Smh27603 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 234667Smh27603 * Use is subject to license terms. 244667Smh27603 */ 254667Smh27603 264667Smh27603 #ifndef _SYS_PPM_PLAT_H 274667Smh27603 #define _SYS_PPM_PLAT_H 284667Smh27603 294667Smh27603 #pragma ident "%Z%%M% %I% %E% SMI" 304667Smh27603 314667Smh27603 #include <sys/i2c/clients/i2c_gpio.h> 324667Smh27603 334667Smh27603 #ifdef __cplusplus 344667Smh27603 extern "C" { 354667Smh27603 #endif 364667Smh27603 374667Smh27603 #define PPM_GET_IO_DELAY(dc, delay) { \ 384667Smh27603 if (dc->method == PPMDC_I2CKIO) \ 394667Smh27603 delay = dc->m_un.i2c.delay; \ 404667Smh27603 else if (dc->method == PPMDC_KIO) \ 414667Smh27603 delay = dc->m_un.kio.delay; \ 424667Smh27603 } 434667Smh27603 44*6464Smh27603 #define PPM_GET_IO_POST_DELAY(dc, delay) { \ 45*6464Smh27603 if (dc->method == PPMDC_I2CKIO) \ 46*6464Smh27603 delay = dc->m_un.i2c.post_delay; \ 47*6464Smh27603 else if (dc->method == PPMDC_KIO) \ 48*6464Smh27603 delay = dc->m_un.kio.post_delay; \ 49*6464Smh27603 } 50*6464Smh27603 514667Smh27603 #ifdef __cplusplus 524667Smh27603 } 534667Smh27603 #endif 544667Smh27603 554667Smh27603 #endif /* _SYS_PPM_PLAT_H */ 56