Need to write a driver for a piece of hardware to be shown as a composite device

Hi everyone, I wanted to know if someone can point me in the right direction to be able to write a driver for a device so it presents itself as two devices(ttysX device and as a Sensor). Any info will be greatly appreciated.