Low-level i2c to send a NAK?

Hi, I’m adding some support for an i2c device, and I’d like to be able to write a special sequence to change the address of the i2c device.

I need to send a character, wait for ack, send the address, wait for ack, then send a ‘not acknowledge’ and a stop condition.

Is it possible to get this level of control with ioctl calls or something like that?